/* ============================================
   SolvMarkets — Pages Shared Styles
   Spot, Market, Login, Signup
   ============================================ */

/* ---------- DEMO MODE BANNER ---------- */
/* Reserve space at the very top so the fixed navbar sits below the yellow
   banner instead of being covered by it. --demo-banner-h is set by JS to the
   real banner height (it can wrap on narrow screens). */
:root { --demo-banner-h: 0px; }

html.demo-active body {
    padding-top: var(--demo-banner-h);
}

html.demo-active .navbar {
    top: var(--demo-banner-h);
}

.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 14px;
    background: linear-gradient(90deg, #f59e0b, #ffb800);
    color: #1a1200;
    font: 600 0.76rem/1.3 'Inter', system-ui, sans-serif;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.demo-banner-msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-banner-btn {
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font: 700 0.72rem 'Inter', system-ui, sans-serif;
    background: rgba(0, 0, 0, 0.14);
    color: #1a1200;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.demo-banner-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.demo-banner-btn-exit {
    background: #1a1200;
    color: #ffb800;
}

@media (max-width: 520px) {
    .demo-banner {
        padding: 7px 10px;
        gap: 6px 8px;
        font-size: 0.7rem;
    }

    .demo-banner-msg {
        width: 100%;
        text-align: center;
    }
}

/* ---------- DEMO MODE TOGGLE (topbar) ---------- */
.demo-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    border-radius: 999px;
    padding: 6px 13px 6px 11px;
    font: 700 0.72rem 'Inter', system-ui, sans-serif;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.demo-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
}

.demo-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.demo-icon {
    width: 15px;
    height: 15px;
}

.demo-icon-power {
    display: none;
}

.demo-toggle-btn.is-on {
    background: linear-gradient(135deg, #3a2a00, #5a4200);
    border-color: rgba(255, 184, 0, 0.5);
    color: #ffb800;
    animation: demoGlow 1.8s ease-in-out infinite;
}

.demo-toggle-btn.is-on .demo-icon-flask {
    display: none;
}

.demo-toggle-btn.is-on .demo-icon-power {
    display: block;
}

@keyframes demoGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 184, 0, 0);
    }

    50% {
        box-shadow: 0 0 12px 1px rgba(255, 184, 0, 0.4);
    }
}

@media (max-width: 520px) {
    .demo-toggle-btn {
        padding: 6px 12px;
        gap: 5px;
    }

    .demo-toggle-icon {
        display: none;
    }

    .demo-toggle-label {
        display: inline;
    }
}

/* ---------- PAGE TRANSITION ---------- */
body {
    opacity: 1;
    animation: pageFadeIn 0.2s ease-out forwards;
}

body.page-exit {
    animation: pageFadeOut 0.15s ease-in forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pageFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* ---------- PAGE LAYOUT ---------- */
.page-main {
    padding-top: calc(var(--nav-height) + 30px + env(safe-area-inset-top, 0px));
    min-height: 100vh;
    padding-bottom: 60px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 8px;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 40px;
}

.nav-link.active {
    color: var(--accent-cyan);
}

/* ---------- PAIR SELECTOR DROPDOWN ---------- */
.pair-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.pair-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition);
    user-select: none;
    border: 1px solid transparent;
}

.pair-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.pair-dropdown-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
}

.pair-dropdown-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pair-dropdown-text .pair-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.pair-dropdown-text .pair-price-tag {
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-alt);
    margin-top: 2px;
}

.pair-dropdown-chevron {
    color: var(--text-secondary);
    transition: transform var(--transition);
    margin-left: 4px;
}

.pair-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 320px;
    max-height: 400px;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.2) transparent;
}

.pair-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.pair-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.pair-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.2);
    border-radius: 6px;
}

.pair-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pair-dropdown-trigger.open .pair-dropdown-chevron {
    transform: rotate(180deg);
}

.pair-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pair-dropdown-item:last-child {
    border-bottom: none;
}

.pair-dropdown-item:hover {
    background: rgba(245, 158, 11, 0.08);
}

.pair-dropdown-item.active {
    background: rgba(245, 158, 11, 0.12);
    position: relative;
}

.pair-dropdown-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-cyan);
}

.pair-item-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
}

.pair-item-info {
    display: flex;
    flex-direction: column;
}

.pair-item-symbol {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.pair-item-name {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.crypto-table tr {
    cursor: pointer;
}

/* ---------- TRADING HEADER (Spot) ---------- */
.trading-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .trading-header { padding: 10px 0; margin-bottom: 12px; }
    .pair-info { width: 100%; justify-content: space-between; gap: 8px; }
    .pair-stats { 
        display: grid; 
        grid-template-columns: repeat(2, 1fr); 
        width: 100%; 
        gap: 12px; 
    }
    .stat-item { padding: 10px; background: rgba(255,255,255,0.03); border-radius: 10px; }
    .pair-name { font-size: 1.25rem; }
    .page-main { padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
    .container { padding: 0 15px; }
}

.pair-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pair-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.pair-price {
    font-family: var(--font-alt);
    font-size: 1.4rem;
    font-weight: 600;
}

.pair-price.price-up {
    color: var(--accent-cyan);
}

.pair-price.price-down {
    color: var(--accent-magenta);
}

.pair-change {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.pair-change.positive {
    color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.1);
}

.pair-change.negative {
    color: var(--accent-magenta);
    background: rgba(244, 63, 122, 0.1);
}

.pair-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---------- TRADING GRID ---------- */
.trading-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-area {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    min-height: 0;
}

@media (max-width: 992px) {
    .trading-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }
    .chart-area, .order-book, .ai-arbitrage-sidebar {
        grid-column: 1 / 2 !important;
        grid-row: auto !important;
    }
    .order-book { order: 3; max-height: 400px; }
    .ai-arbitrage-sidebar { order: 2; }
    .chart-area { order: 1; height: 350px !important; }
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-timeframes,
.chart-type-btns {
    display: flex;
    gap: 4px;
}

.tf-btn {
    font-family: var(--font-alt);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.tf-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.tf-btn.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.spot-chart-canvas {
    width: 100%;
    height: 450px;
    display: block;
}

/* ---------- ORDER BOOK ---------- */
.order-book {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    height: 450px;
    overflow: hidden;
}

.ai-arbitrage-sidebar {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: start;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.ob-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ob-header span:last-child {
    text-align: right;
}

.ob-header span:nth-child(2) {
    text-align: center;
}

.ob-asks,
.ob-bids {
    flex: 1;
    overflow-y: auto;
}

.ob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-family: var(--font-alt);
    font-size: 0.8rem;
    padding: 3px 0;
    position: relative;
    transition: background 0.3s ease;
}

.ob-row .ob-bg {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0.08;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.ob-row span:last-child {
    text-align: right;
}

.ob-row span:nth-child(2) {
    text-align: center;
}

.ob-asks .ob-row span:first-child {
    color: var(--accent-magenta);
}

.ob-bids .ob-row span:first-child {
    color: var(--accent-cyan);
}

.ob-asks .ob-bg {
    background: var(--accent-magenta);
}

.ob-bids .ob-bg {
    background: var(--accent-cyan);
}

.ob-spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.spread-price {
    font-family: var(--font-alt);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.spread-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- CRYPTO TABLE ---------- */
.crypto-table-section {
    margin-top: 40px;
}

.table-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-alt);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.85;
    flex-shrink: 0;
}

.filter-btn.active svg {
    opacity: 1;
}

.market-badge {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 7px;
    border: 1px solid transparent;
    border-radius: 50px;
    font-family: var(--font-alt);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.5;
    vertical-align: middle;
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-card);
}

.crypto-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-alt);
}

.crypto-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.crypto-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

.crypto-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.crypto-table .coin-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.coin-name {
    font-weight: 600;
}

.coin-symbol {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.coin-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.positive {
    color: var(--accent-cyan);
}

.negative {
    color: var(--accent-magenta);
}

/* Live price flash animations */
.price-flash-up {
    animation: flashUp 0.6s ease-out;
}

.price-flash-down {
    animation: flashDown 0.6s ease-out;
}

@keyframes flashUp {
    0% {
        background: rgba(245, 158, 11, 0.25);
        color: #f59e0b;
    }

    100% {
        background: transparent;
    }
}

@keyframes flashDown {
    0% {
        background: rgba(244, 63, 122, 0.25);
        color: #f43f7a;
    }

    100% {
        background: transparent;
    }
}

.crypto-table td {
    transition: background 0.3s ease, color 0.3s ease;
}

.mini-chart {
    width: 100px;
    height: 32px;
}

.trade-btn {
    font-family: var(--font-alt);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.trade-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.6);
}

.trade-btn:active { transform: translateY(1px); }

.trade-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ---------- MARKET STATS BAR ---------- */
.market-hero {
    padding: 20px 0 10px;
}

.market-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 50px;
}

.market-stat {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ms-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.ms-change {
    font-family: var(--font-alt);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- TOP MOVERS ---------- */
.top-movers {
    margin-bottom: 50px;
}

.movers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.mover-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: all var(--transition);
    cursor: pointer;
}

.mover-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow-mixed);
    border-color: rgba(245, 158, 11, 0.15);
}

.mover-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mover-coin {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mover-price {
    font-family: var(--font-alt);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mover-change {
    font-family: var(--font-alt);
    font-size: 0.85rem;
    font-weight: 600;
}

.mover-chart {
    width: 100%;
    height: 40px;
    margin-top: 8px;
}

/* ---------- AUTH PAGES ---------- */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    overflow: hidden;
}

.auth-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 24px;
}

.auth-box {
    background: rgba(12, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-family: var(--font-alt);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 14px;
    transition: all var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.input-wrapper svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 13px 0;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-pw {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
}

.toggle-pw:hover {
    color: var(--text-primary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-cyan);
    width: 16px;
    height: 16px;
}

.checkbox-label a {
    color: var(--accent-cyan);
}

.checkbox-label--top {
    align-items: flex-start;
}

.checkbox-label--top input[type="checkbox"] {
    margin-top: 2px;
    flex: 0 0 auto;
}

.consent-text {
    line-height: 1.5;
}

.consent-text a {
    text-decoration: none;
    white-space: nowrap;
}

.consent-text a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    font-family: var(--font-alt);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.5px;
}

.btn-auth:hover {
    box-shadow: var(--glow-cyan), var(--glow-purple);
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* Login loading state */
.btn-auth.loading {
    pointer-events: none;
    filter: brightness(0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth .auth-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(10, 14, 23, 0.35);
    border-top-color: var(--bg-primary);
    animation: authSpin 0.8s linear infinite;
    flex-shrink: 0;
}

.btn-auth.loading .auth-spinner {
    display: inline-block;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* Full-screen lock overlay during login */
#authLoadingOverlay {
    position: fixed;
    inset: 0;
    z-index: 999997;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: rgba(8, 10, 18, 0.85);
    backdrop-filter: blur(8px);
}

#authLoadingOverlay.show {
    display: flex;
}

#authLoadingOverlay .al-ring {
    position: relative;
    width: 56px;
    height: 56px;
}

#authLoadingOverlay .al-ring i {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(245, 158, 11, 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: authSpin 0.9s linear infinite;
}

#authLoadingOverlay .al-text {
    color: var(--accent-cyan);
    font-family: var(--font-alt);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: alPulse 1.2s ease-in-out infinite;
}

@keyframes alPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-auth .auth-spinner,
    #authLoadingOverlay .al-ring i,
    #authLoadingOverlay .al-text {
        animation: none;
    }
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.social-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-alt);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.social-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.auth-footer-text a {
    color: var(--accent-cyan);
    font-weight: 500;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.pw-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.pw-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0;
}

.pw-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 50px;
}

/* ---------- INFO / WHITEPAPER CARDS ---------- */
.info-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 32px;
}

.info-heading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    position: relative;
    padding: 8px 0 8px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-card ul li:last-child {
    border-bottom: none;
}

.info-card ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .trading-grid {
        grid-template-columns: 1fr;
    }

    .market-stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .pair-stats {
        gap: 16px;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .market-stats-bar {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-btns {
        grid-template-columns: 1fr;
    }

    .auth-box {
        padding: 30px 24px;
    }

    .pair-info {
        flex-wrap: wrap;
    }
}

/* ============================================
   USER DASHBOARD (Reference UI Match)
   ============================================ */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dash-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.dash-tab.active {
    background: rgba(245, 158, 11, 0.1);
    /* Reference Yellow tint */
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.dash-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dash-card {
    background: #101213;
    /* Reference very dark grey */
    border: 1px solid #252627;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

/* Profile left card */
.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-meta {
    flex: 1;
}

.profile-meta h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.crypto-address {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-connect {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-connect:hover {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: var(--glow-cyan);
}

/* Withdraw form items */
.flex-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.available-bal {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dash-input {
    width: 100%;
    background: #000;
    border: 1px solid #252627;
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 8px;
    font-family: var(--font-alt);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.dash-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-suffix .dash-input {
    padding-right: 100px;
}

.suffix-actions {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-max {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-max:hover {
    background: var(--accent-cyan);
    color: #000;
}

.currency-tag {
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-withdraw {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    font-family: var(--font-alt);
    font-weight: 700;
    border: none;
    padding: 14px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-withdraw:hover {
    filter: brightness(1.15);
    box-shadow: var(--glow-cyan);
}

/* Campaign Card */
.campaign-card {
    height: 100%;
}

.campaign-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.text-right {
    text-align: right;
}

.stat-val.highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.campaign-status.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px dashed rgba(245, 158, 11, 0.2);
}

.campaign-rewards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    border-top: 1px solid #252627;
    padding-top: 20px;
}

.reward-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reward-col span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.reward-col strong {
    font-family: var(--font-alt);
    font-size: 0.95rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: rgba(12, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.deposit-header {
    text-align: center;
    margin-bottom: 20px;
}

.deposit-header img {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.warning-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.qr-placeholder {
    text-align: center;
    margin-bottom: 24px;
}

.qr-placeholder img {
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.address-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.address-box input {
    flex: 1;
    background: #000;
    border: 1px solid #252627;
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-done {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    font-weight: 700;
    font-family: var(--font-alt);
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}

.btn-done:hover {
    filter: brightness(1.15);
    box-shadow: var(--glow-cyan);
    transform: translateY(-1px);
}

/* Premium Staking Modal (v3) */
.stake-modal-v3 .modal-box {
    max-width: 480px !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    background: rgba(10, 14, 23, 0.98) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.1) !important;
}

.stake-header-v3 {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stake-coin-icon-v3 {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    padding: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stake-title-group {
    display: flex;
    flex-direction: column;
}

.stake-title-v3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stake-subtitle-v3 {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stake-input-group-v3 {
    margin-bottom: 24px;
}

.stake-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stake-balance-v3 {
    color: var(--accent-cyan);
    font-weight: 600;
    cursor: pointer;
}

.stake-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.stake-input-v3 {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    padding: 14px 80px 14px 16px !important;
    color: #fff !important;
    font-family: var(--font-alt) !important;
    font-size: 1.1rem !important;
    outline: none !important;
    transition: border-color 0.3s;
}

.stake-input-v3:focus {
    border-color: var(--accent-cyan) !important;
}

.stake-max-btn {
    position: absolute;
    right: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.stake-max-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

.stake-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item-v3 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label-v3 {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value-v3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-value-v3.yield {
    color: #f3ba2f; /* BNB yellow for yield */
}

.stake-confirm-btn {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stake-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.stake-cancel-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.stake-cancel-link:hover {
    color: var(--text-primary);
}


/* ---------- SCANNING ANIMATION ---------- */
.dot-spin {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: var(--accent-cyan);
  color: var(--accent-cyan);
  animation: dot-spin 1.5s infinite linear;
  margin: 0 auto;
}

.dot-spin::before, .dot-spin::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.dot-spin::before {
  left: -15px;
  animation: dot-spin 1.5s infinite linear;
  animation-delay: -0.3s;
}

.dot-spin::after {
  left: 15px;
  animation: dot-spin 1.5s infinite linear;
  animation-delay: 0.3s;
}

@keyframes dot-spin {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@media (max-width: 900px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* User Profile Dropdown Styles */
.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: fixed;
    width: 280px;
    background: rgba(8, 10, 18, 0.99); /* Darker, more opaque background */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
    pointer-events: none;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.user-profile-v3 {
    cursor: pointer;
    transition: background 0.3s ease;
}

.user-profile-v3:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-balance {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.1);
    margin-bottom: 8px;
}

.dropdown-balance span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.dropdown-balance strong {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-alt);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.dropdown-menu hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 8px 0;
}

.dropdown-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-cyan);
    padding-left: 20px;
}

.dropdown-item.text-danger {
    color: #ff4d4f;
    margin-top: 8px;
    background: rgba(255, 77, 79, 0.05);
}

.dropdown-item.text-danger:hover {
    background: rgba(255, 77, 79, 0.15);
    color: #ff4d4f;
}

/* ============================================
   AI ARBITRAGE SIDEBAR
   ============================================ */
/* Mode Tabs: Crypto / TradFi */
.mode-tabs {
    position: relative;
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-right: 0;
    gap: 3px;
    margin-bottom: 0;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.mode-tab-thumb {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #ffb800 55%, #ffd34d 100%);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    opacity: 0;
    will-change: transform, width;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease;
}

.mode-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px 6px 7px;
    font-family: var(--font-alt);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
    transition: color 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.mode-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.mode-tab-icon svg {
    width: 15px;
    height: 15px;
}

.mode-tab-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.mode-tab-title {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.mode-tab-sub {
    font-size: 0.57rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: var(--text-muted);
    opacity: 0.7;
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab:hover .mode-tab-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.32);
    transform: translateY(-1px);
}

.mode-tab.active {
    color: #0c0f1a;
}

.mode-tab.active .mode-tab-icon {
    color: #0c0f1a;
    background: rgba(12, 15, 26, 0.16);
    border-color: rgba(12, 15, 26, 0.2);
}

.mode-tab.active .mode-tab-title {
    color: #0c0f1a;
}

.mode-tab.active .mode-tab-sub {
    color: rgba(12, 15, 26, 0.72);
    opacity: 1;
}

@media (max-width: 520px) {
    .mode-tab {
        padding: 5px 11px 5px 6px;
    }

    .mode-tab-icon {
        width: 27px;
        height: 27px;
    }

    .mode-tab-title {
        font-size: 0.74rem;
    }

    .mode-tab-sub {
        display: none;
    }
}

@media (max-width: 768px) {
    .mode-tabs {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 14px;
    }
}

.ai-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 4px;
}

.ai-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-alt);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ai-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.ai-tab.active {
    background: rgba(245,158,11,0.08);
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 0 12px rgba(245,158,11,0.06);
}

.ai-tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
    min-height: 0;
}

.ai-tab-content.active {
    display: flex;
}

/* QT Bot Details */
.qt-bot-details {
    background: linear-gradient(145deg, rgba(245,158,11,0.04), rgba(0,0,0,0.2));
    border: 1px solid rgba(245,158,11,0.08);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
}

.qt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.qt-icon-wrap {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(245,158,11,0.08);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(245,158,11,0.12);
}

.qt-header-text {
    display: flex; flex-direction: column; gap: 2px;
}

.qt-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.qt-tier-badge {
    font-family: var(--font-alt);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.qt-metrics {
    display: flex;
    padding: 12px 16px;
    gap: 12px;
}

.qt-metric {
    flex: 1;
    display: flex; flex-direction: column; gap: 4px;
}

.qt-metric-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.qt-metric-val {
    font-family: var(--font-alt);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.qt-power-row {
    display: flex; flex-direction: column; gap: 4px;
}

.qt-power-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.qt-power-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), #00d2a0);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.qt-upgrade-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    border-top: 1px solid rgba(255,255,255,0.04);
    transition: all 0.25s;
}

.qt-upgrade-link:hover {
    color: var(--accent-cyan);
    background: rgba(245,158,11,0.03);
}

/* Profitable Trades */
.trades-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trades-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.profitable-trades-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
    height: 560px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.profitable-trades-list::-webkit-scrollbar {
    width: 4px;
}

.profitable-trades-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.execute-all-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    padding: 0 18px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background: #f59e0b;
    color: #14110a;
    font-family: var(--font-alt);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(18, 14, 4, 0.4), 0 2px 10px rgba(245, 158, 11, 0.18);
    -webkit-tap-highlight-color: transparent;
}

.execute-all-btn:hover {
    background: #ffb020;
    box-shadow: 0 1px 2px rgba(18, 14, 4, 0.4), 0 4px 16px rgba(245, 158, 11, 0.32);
}

.execute-all-btn:active {
    background: #e08c06;
    transform: translateY(1px);
    box-shadow: inset 0 1px 2px rgba(18, 14, 4, 0.35);
}

.execute-all-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Locked (non-Gold) Auto Trade button — click still routes to upgrade */
.execute-all-btn.is-locked {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(245, 158, 11, 0.28) !important;
    box-shadow: none !important;
}
.execute-all-btn.is-locked:hover {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--accent-cyan) !important;
    box-shadow: none !important;
}

/* Custom icon + energy pill inside the Auto Trade button */
.execute-all-btn .eab-icon { display: inline-flex; width: 17px; height: 17px; flex: 0 0 auto; }
.execute-all-btn .eab-icon svg { width: 17px; height: 17px; display: block; }
.execute-all-btn .eab-label { line-height: 1; }
.execute-all-btn .eab-energy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 20px;
    padding: 0 7px;
    margin-left: 1px;
    border-radius: 6px;
    background: rgba(20, 17, 10, 0.22);
    font-family: var(--font-alt);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    color: inherit;
}
.execute-all-btn.is-locked .eab-energy { display: none; }

/* ── Gold-plan upsell overlay ─────────────────────────────── */
.gold-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 8, 16, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.gold-overlay.show { opacity: 1; }

.gold-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 34px 30px 26px;
    border-radius: 22px;
    text-align: center;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(245, 158, 11, 0.22), transparent 60%),
        linear-gradient(180deg, rgba(20, 24, 38, 0.98), rgba(12, 15, 26, 0.99));
    border: 1px solid rgba(245, 158, 11, 0.32);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    overflow: hidden;
    transform: translateY(18px) scale(0.96);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.28s ease;
}
.gold-overlay.show .gold-modal { transform: translateY(0) scale(1); opacity: 1; }

.gold-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.gold-modal-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.gold-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    color: #f6c453;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 2px;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.18);
}

.gold-modal-title {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.3px;
    color: #fff;
}

.gold-modal-sub {
    margin: 0 auto 18px;
    max-width: 320px;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-secondary, #94a3b8);
}

.gold-modal-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
}
.gold-price-amount {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #f6c453;
    text-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}
.gold-price-per { font-size: 0.8rem; color: var(--text-muted); }

.gold-modal-features {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    text-align: left;
    display: grid;
    gap: 10px;
}
.gold-modal-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-primary, #e2e8f0);
}
.gold-tick {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.66rem;
    font-weight: 800;
    color: #04121b;
    background: linear-gradient(135deg, #f6c453, #f59e0b);
}

.gold-modal-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #0a0e1a;
    background: linear-gradient(135deg, #f6c453, #f59e0b 55%, #e8871e);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
    transition: transform 0.18s ease, box-shadow 0.22s ease;
}
.gold-modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(245, 158, 11, 0.5);
}
.gold-modal-cta:active { transform: translateY(0); }

.gold-modal-link {
    display: inline-block;
    margin: 14px 0 4px;
    font-size: 0.76rem;
    color: var(--accent-cyan);
    text-decoration: none;
    border-bottom: 1px dashed rgba(245, 158, 11, 0.4);
    padding-bottom: 2px;
}
.gold-modal-link:hover { color: #f6c453; }

.gold-modal-later {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.76rem;
    cursor: pointer;
    transition: color 0.2s ease;
}
.gold-modal-later:hover { color: var(--text-primary, #e2e8f0); }

@media (max-width: 420px) {
    .gold-modal { padding: 28px 20px 20px; border-radius: 18px; }
    .gold-modal-title { font-size: 1.3rem; }
    .gold-price-amount { font-size: 1.7rem; }
}

/* Trade Execution Modal */
.trade-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
}

.trade-modal {
    background: rgba(15,20,35,0.98);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 18px;
    padding: 28px 24px;
    width: 90%; max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 40px rgba(245,158,11,0.08);
}

.trade-modal-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem; font-weight: 800;
    text-align: center; margin-bottom: 20px;
    letter-spacing: 1px;
}

.trade-modal-stat {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 0.85rem;
}
.trade-modal-stat span { color: var(--text-muted); }
.trade-modal-stat strong { color: var(--text-primary); font-family: var(--font-alt); }

.trade-modal-divider {
    height: 1px; background: rgba(255,255,255,0.06); margin: 14px 0;
}

.trade-modal-field label {
    display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px;
}

.trade-modal-qty {
    display: flex; align-items: center; gap: 8px;
}

.qty-btn {
    width: 38px; height: 38px;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    background: rgba(255,255,255,0.04); color: var(--text-primary);
    font-size: 1.1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.qty-btn:hover { background: rgba(245,158,11,0.1); border-color: var(--accent-cyan); }

.qty-max {
    padding: 0 14px; height: 38px;
    border: 1px solid rgba(245,158,11,0.3); border-radius: 10px;
    background: rgba(245,158,11,0.08); color: var(--accent-cyan);
    font-size: 0.75rem; font-weight: 700; cursor: pointer;
    letter-spacing: 1px;
}
.qty-max:hover { background: rgba(245,158,11,0.2); }

.trade-modal-qty input {
    width: 60px; height: 38px; text-align: center;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    background: rgba(255,255,255,0.04); color: var(--text-primary);
    font-size: 1rem; font-weight: 600; font-family: var(--font-alt);
}

.trade-modal-summary {
    margin-top: 16px; padding: 14px;
    background: rgba(245,158,11,0.04); border-radius: 12px;
    border: 1px solid rgba(245,158,11,0.08);
}

.summary-row {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; padding: 4px 0;
}
.summary-row span { color: var(--text-muted); }
.summary-row strong { font-family: var(--font-alt); }

.trade-modal-actions {
    display: flex; gap: 10px; margin-top: 20px;
}

.modal-btn-cancel {
    flex: 1; padding: 14px;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
    background: transparent; color: var(--text-muted);
    font-size: 0.85rem; cursor: pointer;
}

.modal-btn-execute {
    flex: 2; padding: 14px;
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #14b8a6);
    color: #000; font-family: 'Chakra Petch', sans-serif;
    font-weight: 800; font-size: 0.85rem; letter-spacing: 1px;
    cursor: pointer; transition: all 0.3s;
}
.modal-btn-execute:hover { transform: scale(1.02); box-shadow: 0 8px 30px rgba(245,158,11,0.3); }
.modal-btn-execute:disabled { opacity: 0.5; transform: none; cursor: not-allowed; }

.trade-card {
    background: rgba(12, 15, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.trade-card:hover {
    border-color: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.04);
}

/* Staggered entrance animation */
@keyframes tradeSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.trade-card {
    opacity: 0;
    animation: tradeSlideIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.trade-card:nth-child(1) { animation-delay: 0.05s; }
.trade-card:nth-child(2) { animation-delay: 0.12s; }
.trade-card:nth-child(3) { animation-delay: 0.19s; }
.trade-card:nth-child(4) { animation-delay: 0.26s; }
.trade-card:nth-child(5) { animation-delay: 0.33s; }
.trade-card:nth-child(6) { animation-delay: 0.40s; }
.trade-card:nth-child(7) { animation-delay: 0.47s; }
.trade-card:nth-child(8) { animation-delay: 0.54s; }

/* Yield glow pulse */
@keyframes yieldPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(245,158,11,0.3); }
    50%      { text-shadow: 0 0 18px rgba(245,158,11,0.6); }
}

.trade-card .profit-val[style*="color:var(--accent-cyan)"] {
    animation: yieldPulse 2s ease-in-out infinite;
}

/* Per-signal Trade button — lets the user pick exactly which signal to trade */
.trade-card-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.trade-card-btn {
    width: 100%;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent-cyan);
    font-family: var(--font-alt);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.trade-card-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.trade-card-btn:active { transform: translateY(1px); box-shadow: none; }

.trade-card-btn svg { flex-shrink: 0; }

.trade-card-btn-pct {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 6px;
    padding: 1px 6px;
}

.ai-confidence-badge {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(20, 184, 166, 0.4);
    letter-spacing: 0.5px;
}

.trade-pair-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.trade-pair {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.trade-pair-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 6px;
    padding: 3px 8px;
    text-transform: uppercase;
}

.trade-pair-badge::before {
    content: '● ';
    color: #00ff88;
    font-size: 0.5rem;
    animation: liveDot 1.6s ease-in-out infinite;
}

@keyframes liveDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.trade-exchange-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    align-items: center;
}

.trade-exchange-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-exchange-side.end {
    text-align: right;
    align-items: flex-end;
}

.exchange-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.exchange-name {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trade-input-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.trade-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-field.end {
    text-align: right;
}

.field-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.execute-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-family: var(--font-alt);
    font-size: 1rem;
    width: 100px;
    padding: 2px 0;
    outline: none;
    transition: border-color var(--transition);
}

.execute-input:focus {
    border-color: var(--accent-cyan);
}

.price-val {
    font-family: var(--font-alt);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.live-price { transition: color 0.2s ease; }
.price-up   { color: #f59e0b !important; }
.price-down { color: #ff4d4f !important; }

.profit-val {
    font-family: var(--font-alt);
    color: #00ff00;
    font-size: 0.95rem;
    font-weight: 600;
}

.trade-btn {
    margin-top: 16px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
}

/* ============================================
   AI ANALYSIS TAB — PREMIUM STYLES
   ============================================ */

/* Signal Header */
.ai-signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 15, 26, 0.4);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.ai-signal-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    font-family: var(--font-alt);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ai-signal-badge.bullish {
    background: linear-gradient(90deg, rgba(0, 255, 160, 0.2), rgba(0, 255, 160, 0.05));
    border: 1px solid rgba(0, 255, 160, 0.4);
    color: #00ffa0;
    text-shadow: 0 0 5px rgba(0, 255, 160, 0.5);
}

.ai-signal-badge.bearish {
    background: linear-gradient(90deg, rgba(255, 70, 100, 0.2), rgba(255, 70, 100, 0.05));
    border: 1px solid rgba(255, 70, 100, 0.4);
    color: #ff4664;
    text-shadow: 0 0 5px rgba(255, 70, 100, 0.5);
}

.ai-signal-badge.neutral {
    background: linear-gradient(90deg, rgba(255, 184, 0, 0.2), rgba(255, 184, 0, 0.05));
    border: 1px solid rgba(255, 184, 0, 0.4);
    color: #ffb800;
    text-shadow: 0 0 5px rgba(255, 184, 0, 0.5);
}

.signal-icon { font-size: 0.8rem; }

.ai-confidence {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-alt);
    font-weight: 500;
}

/* AI Cards */
.ai-card {
    background: rgba(12, 15, 26, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 12px;
    padding: 16px;
    box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.02);
}

.ai-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

/* Sentiment Bar */
.sentiment-bar-container { margin-bottom: 8px; }

.sentiment-bar {
    height: 8px;
    border-radius: 100px;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #00ff88);
    position: relative;
    overflow: hidden;
}

.sentiment-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-right: 3px solid #fff;
    background: transparent;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 2px 0 8px rgba(255,255,255,0.5);
}

/* Sweeping light streak for a live, scanning feel */
.sentiment-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    height: 100%;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: sentiment-sweep 2.6s ease-in-out infinite;
}

@keyframes sentiment-sweep {
    0% { left: -60%; }
    55% { left: 120%; }
    100% { left: 120%; }
}

.sentiment-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.sentiment-labels .fear { color: #ff4444; }
.sentiment-labels .greed { color: #00ff88; }

.sentiment-value {
    text-align: center;
    font-family: var(--font-alt);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-top: 4px;
}

/* Technical Indicators */
.indicator-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.indicator-row:last-child { border-bottom: none; }

.ind-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
}

.ind-val {
    font-family: var(--font-alt);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

.ind-signal {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ind-signal.buy {
    background: rgba(0, 255, 160, 0.1);
    color: #00ffa0;
    border: 1px solid rgba(0, 255, 160, 0.2);
}

.ind-signal.sell {
    background: rgba(255, 70, 100, 0.1);
    color: #ff4664;
    border: 1px solid rgba(255, 70, 100, 0.2);
}

.ind-signal.neutral {
    background: rgba(255, 184, 0, 0.08);
    color: #ffb800;
    border: 1px solid rgba(255, 184, 0, 0.2);
}

/* Support / Resistance Levels */
.levels-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.level-item.resistance {
    background: rgba(255, 70, 100, 0.06);
    border-left: 3px solid #ff4664;
}

.level-item.support {
    background: rgba(0, 255, 160, 0.06);
    border-left: 3px solid #00ffa0;
}

.level-item.current {
    background: rgba(0, 200, 255, 0.08);
    border-left: 3px solid var(--accent-cyan);
    border: 1px solid rgba(0, 200, 255, 0.2);
}

.level-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.level-price {
    font-family: var(--font-alt);
    font-weight: 600;
    color: var(--text-primary);
}

.level-item.resistance .level-price { color: #ff4664; }
.level-item.support .level-price { color: #00ffa0; }
.level-item.current .level-price { color: var(--accent-cyan); font-weight: 700; }

/* Volume Bars */
.volume-bars {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    height: 60px;
    margin-bottom: 10px;
}

.vol-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}

.vol-bar-wrap span {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.vol-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: height 0.6s ease, background 0.5s ease;
    transform-origin: bottom;
}

@keyframes vol-grow-in {
    from { transform: scaleY(0.3); opacity: 0.4; }
    to { transform: scaleY(1); opacity: 1; }
}

.vol-bar.green {
    background: linear-gradient(180deg, rgba(0, 255, 160, 0.6), rgba(0, 255, 160, 0.15));
}

.vol-bar.red {
    background: linear-gradient(180deg, rgba(255, 70, 100, 0.6), rgba(255, 70, 100, 0.15));
}

.volume-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.volume-summary strong { color: var(--text-primary); }
.text-green { color: #00ffa0 !important; }
.text-red { color: #ff4664 !important; }

/* AI Recommendation Card */
.ai-recommendation {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(20, 184, 166, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 16px;
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.rec-icon { font-size: 1.1rem; }

.rec-title {
    font-family: var(--font-alt);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.rec-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.rec-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.rec-algo {
    color: rgba(20, 184, 166, 0.7);
}

/* ============================================/* ============================================
   USER DASHBOARD V3 — PREMIUM PROFESSIONAL
   ============================================ */
.v3-layout {
    background: #020205 !important;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    position: relative;
}

.dash-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 40px 40px;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.v3-topbar {
    height: auto;
    min-height: 70px;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(2, 2, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 2000; /* Elevated stacking context */
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.topbar-left {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.v3-breadcrumb {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.system-status-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 100px;
}

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

.pulse-dot.green {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulse 2s infinite;
}

.status-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

.user-profile-v3 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    padding-right: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    cursor: pointer;
}

.v3-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-cyan);
}

.v3-user-meta {
    display: flex;
    flex-direction: column;
}

.v3-username {
    font-size: 0.85rem;
    font-weight: 700;
}

.v3-user-id {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.v3-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Metrics Grid */
.v3-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 24px;
}

.metric-card {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.metric-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
}

/* Floating wallet button — centred directly above the support FAB.
   Support FAB: right:20px, width:58px → centre at 49px from the edge.
   Wallet FAB: width:40px → right must be 49 - 20 = 29px to share that centre. */
.wallet-fab {
    position: fixed;
    right: 29px;
    bottom: 88px;
    z-index: 1900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(20, 184, 166, 0.3);
    background: rgba(10, 12, 20, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.wallet-fab:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(20, 184, 166, 0.5);
    transform: translateY(-1px);
}
.wallet-fab:active { transform: translateY(0); }

@media (max-width: 992px) {
    .wallet-fab { right: 25px; bottom: calc(74px + 14px + env(safe-area-inset-bottom, 0px) + 68px); }
}
@media (max-width: 480px) {
    .wallet-fab { right: 25px; bottom: calc(74px + 14px + env(safe-area-inset-bottom, 0px) + 68px); }
}

.metric-value {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.metric-value small { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.metric-trend {
    font-size: 0.75rem;
    font-weight: 700;
}

.balance-detail-row {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.balance-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.balance-detail strong {
    font-size: 0.78rem;
    font-weight: 700;
}

.locked-badge {
    display: none;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(255,165,0,0.06);
    border: 1px solid rgba(255,165,0,0.2);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffa500;
    letter-spacing: 0.5px;
    align-items: center;
    gap: 6px;
}

.metric-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    font-size: 1.25rem;
}

.cyan-glow { color: var(--accent-cyan); border: 1px solid rgba(245, 158, 11, 0.2); box-shadow: 0 0 20px rgba(245, 158, 11, 0.1); }
.purple-glow { color: var(--accent-purple); border: 1px solid rgba(20, 184, 166, 0.2); box-shadow: 0 0 20px rgba(20, 184, 166, 0.1); }
.gold-glow { color: var(--accent-gold); border: 1px solid rgba(255, 184, 0, 0.2); box-shadow: 0 0 20px rgba(255, 184, 0, 0.1); }
.magenta-glow { color: var(--accent-magenta); border: 1px solid rgba(244, 63, 122, 0.2); box-shadow: 0 0 20px rgba(244, 63, 122, 0.1); }

.v3-card-btn {
    padding: 10px 20px;
    background: var(--accent-cyan);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.v3-card-btn:hover {
    background: #fff;
    box-shadow: 0 0 15px var(--accent-cyan);
    transform: translateY(-2px);
}

.v3-card-btn.abs {
    position: absolute;
    bottom: 24px;
    right: 24px;
}

/* Health Card Specific */
.v3-health-meter {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 12px 0 6px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-magenta), var(--accent-purple));
    box-shadow: 0 0 8px var(--accent-magenta);
}

.health-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-magenta);
}

/* Container & Centering */
.v3-container {
    max-width: 1450px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 768px) {
    .v3-container { padding: 0 20px; }
}

/* Grid Systems */
.v3-main-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin-bottom: 24px;
}

.v3-footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.v3-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 30px;
}

.input-v3 { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.input-v3.full { grid-column: span 2; }
.input-v3 label { font-size: 0.7rem; font-weight: 800; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1.5px; }

.input-v3 input, .input-v3 select {
    background: rgba(2, 2, 5, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    font-family: var(--font-alt);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.input-v3 input:focus, .input-v3 select:focus {
    border-color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.03) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1), inset 0 2px 4px rgba(0,0,0,0.2);
}

.label-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.v2-avail { font-size: 0.7rem; color: var(--accent-cyan); font-weight: 700; }

.glass-card-v3 {
    background: rgba(12, 15, 26, 0.4);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
}

.glass-card-v3 h3 {
    margin: 0 0 20px 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header-v3 {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.staking-body-v3 { padding: 30px; }
.withdrawal-v3, .status-v3 { padding: 30px; }
.status-v3 { margin-bottom: 24px; }
.withdrawal-v3 .v3-form-grid { padding: 8px 0 0 0 !important; }

@media (max-width: 768px) {
    .withdrawal-v3, .status-v3 { padding: 20px !important; }
}

.v3-tag {
    padding: 5px 12px;
    background: rgba(244, 63, 122, 0.15);
    color: var(--accent-magenta);
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: inline-block;
}

.v3-tag.is-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.card-header-v3 h3 { 
    font-family: var(--font-heading); 
    font-size: 1.15rem; 
    font-weight: 800; 
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.card-header-v3 .header-main { min-width: 0; }

/* Specific Alignment Force */
.withdrawal-v3 .card-header-v3,
.status-v3 .card-header-v3 {
    padding: 24px 30px !important;
}

.withdrawal-v3 .card-header-v3 h3,
.status-v3 .card-header-v3 h3,
.withdrawal-v3 h3,
.status-v3 h3 {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}


.apy-pill {
    padding: 8px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

/* Staking Body V3 */
.staking-body-v3 { padding: 24px; }

/* ============================================
   STAKING CARD — ACTIVE / HISTORY TOGGLE
   ============================================ */
.card-header-v3 .header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
}

.stake-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stake-tab {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    line-height: 1;
}

.stake-tab:hover { color: var(--text-primary); }

.stake-tab.active {
    color: #0a0f1a;
    background: linear-gradient(135deg, #f59e0b, #ffa500);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}

/* History entry status badge */
.stake-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    font-family: var(--font-alt);
    border: 1px solid transparent;
    white-space: nowrap;
}
.stake-status-badge.is-completed { color: #22c55e; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.25); }
.stake-status-badge.is-cancelled { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.25); }

.stake-history-dates {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    color: var(--text-muted);
}
.stake-history-dates strong { color: var(--text-secondary); font-family: var(--font-alt); }

@media (max-width: 560px) {
    .card-header-v3 .header-side { gap: 8px; }
    .stake-tab { padding: 6px 10px; font-size: 0.62rem; }
}

.staking-stats-v3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.s-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; }
.s-val { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.s-val small { font-size: 0.9rem; color: var(--text-muted); }

.staking-progress-v3 { margin-bottom: 30px; }

.v3-bar-header { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; margin-bottom: 10px; }

.v3-progress-bar { height: 10px; background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.03); }
.v3-fill { height: 100%; background: linear-gradient(90deg, var(--accent-magenta), var(--accent-cyan)); box-shadow: 0 0 15px rgba(244, 63, 122, 0.3); }

.rewards-grid-v3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.reward-box {
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
}

.r-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 800; display: block; margin-bottom: 6px; }
.r-val { font-family: var(--font-alt); font-size: 1.1rem; font-weight: 700; }

/* Terminal V3 */
.terminal-v3 { display: flex; flex-direction: column; background: #05070a !important; border-radius: 0 0 24px 24px; }

.terminal-header-v3 {
    padding: 16px 24px;
    background: rgba(255,255,255,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.t-title { font-size: 0.7rem; font-weight: 800; color: var(--accent-cyan); display: flex; align-items: center; gap: 8px; }
.t-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); }
.t-dot.pulse { animation: pulse 1.5s infinite; }

.terminal-body-v3 {
    flex: 1;
    padding: 20px;
    font-family: 'Chakra Petch', monospace;
    font-size: 0.8rem;
    overflow-y: auto;
    color: rgba(255,255,255,0.7);
}

.t-line { margin-bottom: 8px; border-left: 2px solid transparent; padding-left: 10px; }
.t-line:hover { border-color: var(--accent-cyan); color: #fff; background: rgba(245, 158, 11, 0.03); }

.v3-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.7;
}

@media (max-width: 960px) {
    .v3-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .v3-main-grid, .v3-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .v3-topbar { padding: 0 20px; }
    .dash-scroll-container { padding: 20px; }
    .v3-container { padding: 0 15px; }
    .v3-metrics-grid { grid-template-columns: 1fr !important; }
    .staking-stats-v3, .rewards-grid-v3, .v3-form-grid { grid-template-columns: 1fr; }
}

.input-with-action { position: relative; display: flex; align-items: center; width: 100%; }
.input-with-action input { width: 100%; padding-right: 80px !important; }
.input-with-action button { 
    position: absolute; 
    right: 8px; 
    background: var(--accent-cyan); 
    border: none; 
    color: #000; 
    padding: 6px 14px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.3s;
}
.input-with-action button:hover { background: #fff; transform: scale(1.05); }

.v3-btn-primary {
    margin: 0 24px 24px;
    padding: 18px;
    border-radius: 16px;
    border: none;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

/* Status Widget */
.status-v3 { padding: 24px 30px; }
.status-list-v3 { display: flex; flex-direction: column; gap: 16px; margin: 20px 0 0; }
.status-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 600; }
.val-tag { padding: 4px 10px; border-radius: 6px; font-size: 0.65rem; font-weight: 800; background: rgba(255,255,255,0.05); }
.val-tag.green { color: var(--accent-cyan); background: rgba(245, 158, 11, 0.1); }

/* Engine Status header row: title left, latency badge top-right */
.engine-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}
.latency-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(20, 184, 166, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.12);
    white-space: nowrap;
}
.latency-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.latency-badge .val-tag {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-cyan);
    font-size: 0.7rem;
    padding: 3px 10px;
}
.latency-badge .latency-live-dot {
    margin-right: 0;
}

.latency-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    flex-shrink: 0;
    margin-right: 6px;
    animation: latency-blink 1.4s ease-in-out infinite;
}
@keyframes latency-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(0.8); }
}

/* Engine Vitals — live trading market feed (candlesticks + ticker tape) */
/* ── ENGINE STATUS (bot health) ────────────────────────── */
.status-v3 { padding: 24px 26px; }

/* ── Engine trigger button (topbar + compact mobile twin) ─ */
.engine-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent-cyan);
    font-family: var(--font-alt);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}
.engine-top-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.6);
}
.engine-top-btn:active { transform: translateY(1px); }

.engine-top-btn .eng-top-ic { display: block; flex: 0 0 auto; opacity: 0.9; }
.engine-top-btn .eng-top-label { line-height: 1; }
.engine-top-ms {
    font-family: var(--font-alt);
    font-size: 0.68rem;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 5px;
    padding: 2px 6px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Blinking live dot — shared by desktop + mobile triggers */
.eng-top-dot {
    position: relative;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
    animation: engDot 1.8s ease-in-out infinite;
}
.eng-top-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.55);
    animation: engDotPulse 1.8s ease-out infinite;
}
@keyframes engDotPulse {
    0%   { transform: scale(0.6); opacity: 0.9; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Compact twin that lives on the POWER card on mobile */
.engine-top-btn-sm {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    height: 26px;
    padding: 0 8px;
    gap: 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
}
.engine-top-btn-sm .eng-top-dot { width: 6px; height: 6px; }
.engine-top-btn-sm .eng-top-ms { font-size: 0.6rem; padding: 2px 5px; }

/* Mobile: swap the topbar trigger for the compact one on the POWER card */
@media (max-width: 960px) {
    #engineStatusBtn { display: none; }
    #engineStatusBtnMobile { display: inline-flex; }
}

/* ── ENGINE STATUS (bot health) ────────────────────────── */

/* Header */
.eng-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.eng-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eng-avatar img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.35));
    position: relative;
    z-index: 1;
}
.eng-avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.35);
    animation: engRing 3s ease-out infinite;
}
@keyframes engRing {
    0%   { transform: scale(0.9); opacity: 0.9; }
    70%  { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}
.eng-avatar-dot {
    position: absolute;
    right: 1px;
    bottom: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0d1220;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    z-index: 2;
    animation: engDot 1.8s ease-in-out infinite;
}
@keyframes engDot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}
.eng-head-text { flex: 1; min-width: 0; }
.eng-head-text h3 { margin: 0; font-size: 1.02rem; }
.eng-sub {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Live stat cards */
.eng-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.eng-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 13px 14px 12px;
    min-width: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.eng-card:hover {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.03);
}
.eng-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.eng-card-label {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.eng-card-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-cyan);
    flex: 0 0 auto;
}
.eng-card-val {
    margin-top: 8px;
    font-family: var(--font-alt);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eng-card-val span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.eng-card-val.eng-pkg { font-size: 1.15rem; }
.eng-bar {
    margin-top: 10px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.eng-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.eng-card-foot {
    margin-top: 8px;
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Latency chart */
.eng-chart {
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(160deg, rgba(20, 184, 166, 0.05), rgba(245, 158, 11, 0.02) 60%, rgba(0, 0, 0, 0.25));
    padding: 13px 14px 12px;
    overflow: hidden;
}
.eng-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.eng-chart-title {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.eng-chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #22c55e;
}
.eng-chart-legend i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
    animation: engDot 1.8s ease-in-out infinite;
}
.eng-chart-wrap {
    position: relative;
    height: 168px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.eng-chart-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Bottom status strip */
.eng-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.eng-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
}
.eng-stat span { color: var(--text-muted); }
.eng-stat b {
    font-family: var(--font-alt);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    padding: 3px 9px;
    border-radius: 6px;
    color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.1);
}
.eng-stat b.ok { color: #22c55e; background: rgba(34, 197, 94, 0.1); }

/* Live price tag riding the chart line */
.market-live-tag {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-alt);
    font-size: 0.66rem;
    font-weight: 700;
    color: #06090d;
    background: var(--accent-cyan);
    padding: 2px 7px;
    border-radius: 5px;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: top 0.15s linear;
    z-index: 2;
    font-variant-numeric: tabular-nums;
}

.ticker-tape {
    position: relative;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
    display: inline-flex;
    gap: 28px;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll 34s linear infinite;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-alt);
    font-size: 0.72rem;
    font-weight: 700;
}
.ticker-item .tp-sym { color: var(--text-secondary); letter-spacing: 0.6px; }
.ticker-item .tp-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ticker-item .tp-price { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ticker-item .tp-chg { font-weight: 800; }
.ticker-item .tp-chg.up { color: #22c55e; }
.ticker-item .tp-chg.down { color: #ef4444; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
}
@media (max-width: 768px) {
    .engine-body { grid-template-columns: 1fr; gap: 20px; }
    .status-list-v3 { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 12px 22px; }
    .market-chart-wrap { min-height: 180px; }
}

/* ============================================
   LANDING — AVAILABLE MARKETS SHOWCASE
   ============================================ */
.markets-section {
    padding: 90px 0 70px;
    position: relative;
    overflow: hidden;
}
.markets-section::before {
    content: '';
    position: absolute;
    top: -140px;
    left: 50%;
    width: 900px;
    height: 520px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(245, 158, 11, 0.1), transparent 70%);
    pointer-events: none;
}
.markets-section .section-header { margin-bottom: 34px; margin-top: 0; }
.markets-ticker {
    margin-bottom: 40px;
    padding: 14px 0;
    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.015);
}
.markets-ticker .ticker-tape { margin-top: 0; padding-top: 0; border-top: none; }
.market-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
}
.mk-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 20px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(245, 158, 11, 0.12);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}
.mk-cat:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(245, 158, 11, 0.12);
}
.mk-cat-icons {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.mk-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px;
    margin-left: -12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease;
}
.mk-logo:first-child { margin-left: 0; }
.mk-cat:hover .mk-logo { transform: translateY(-3px); }
.mk-cat-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.mk-cat-count {
    font-family: var(--font-alt);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-cyan);
}
.mk-cat-tags {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}
.mk-cat-arrow {
    position: absolute;
    top: 22px;
    right: 18px;
    color: var(--text-muted);
    transition: transform 0.25s ease, color 0.25s ease;
}
.mk-cat:hover .mk-cat-arrow { transform: translateX(4px); color: var(--accent-cyan); }
@media (max-width: 600px) {
    .markets-section { padding: 60px 0 50px; }
    .market-cats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .mk-cat { padding: 16px 14px; }
    .mk-logo { width: 32px; height: 32px; }
    .mk-cat-name { font-size: 0.92rem; }
}


.v3-mini-chart-placeholder {
    height: 60px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-top: auto;
}

.v3-mini-chart-placeholder .bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-purple), var(--accent-cyan));
    border-radius: 4px 4px 0 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.v3-mini-chart-placeholder .bar:hover { opacity: 1; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 960px) {
    .v3-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .v3-main-grid, .v3-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .v3-layout { height: auto; overflow: visible; }
    .v3-topbar { padding: env(safe-area-inset-top, 0px) 12px 0; height: auto; min-height: 60px; }
.page-title {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    top: 4px;
}
    .v3-breadcrumb { display: none; }
    .topbar-actions { gap: 6px; flex-shrink: 0; }
    #displayBalance { display: none; }
    .topbar-actions .v3-btn-stake,
    .topbar-actions .v3-btn-withdraw { padding: 6px 10px; font-size: 0.62rem; letter-spacing: 0.5px; min-width: 82px; }
    .topbar-actions .v3-btn-stake .btn-icon,
    .topbar-actions .v3-btn-withdraw .btn-icon { display: none; }
    .system-status-chip { display: none; }
    .v3-username { font-size: 0.75rem; }
    .dash-scroll-container { padding: 15px 12px; }
    .v3-metrics-grid { grid-template-columns: 1fr !important; gap: 12px; }
    .metric-card { padding: 16px 20px; min-height: unset; }
    .metric-value { font-size: 1.2rem; }
    .metric-icon { width: 40px; height: 40px; font-size: 1rem; border-radius: 12px; }

    /* Wallet-app style hero balance on mobile: centered + large amount */
    .balance-card {
        display: block;
        text-align: center;
        padding: 26px 20px;
        background: radial-gradient(120% 140% at 50% 0%, rgba(245,158,11,0.10), rgba(245,158,11,0) 60%), var(--glass-bg, rgba(255,255,255,0.02));
    }
    .balance-card .metric-info { width: 100%; text-align: center; }
    .balance-card .metric-label {
        font-size: 0.7rem;
        letter-spacing: 2.5px;
        margin-bottom: 12px;
        opacity: 0.75;
    }
    .balance-card .metric-value {
        font-size: clamp(2.4rem, 12vw, 3.1rem);
        line-height: 1;
        letter-spacing: -1.5px;
        margin-bottom: 8px;
    }
    .balance-card .metric-value small {
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0;
        margin-left: 2px;
    }
    .balance-card .balance-detail-row {
        justify-content: center;
        gap: 26px;
        margin-top: 16px;
    }
    .balance-card .balance-detail { justify-content: center; }
    .balance-card .locked-badge { justify-content: center; margin-left: auto; margin-right: auto; }

    .v3-btn-primary { margin: 0 16px 16px; padding: 14px; }
    .v3-user-meta { display: none; }
    .user-profile-v3 { padding: 4px 8px; min-width: 44px; min-height: 44px; justify-content: center; flex-shrink: 0; z-index: 2100; pointer-events: auto !important; cursor: pointer !important; }
}

/* ============================================
   NEW DASHBOARD SIDEBAR V3
   ============================================ */
.dash-body {
    display: flex;
    min-height: 100vh;
    background: #020205 !important;
    overflow-x: hidden;
    margin: 0;
}

.dash-sidebar {
    width: 96px;
    height: 100vh;
    background: rgba(12, 15, 26, 0.8);
    backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: 1000;
}

.sidebar-logo {
    margin-bottom: 32px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 72px;
    height: 58px;
    border-radius: 14px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.sidebar-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.sidebar-label {
    font-size: 0.52rem;
    line-height: 1;
    font-family: var(--font-alt);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.05);
    transform: translateY(-2px);
}

.sidebar-link:hover .sidebar-label {
    color: var(--accent-cyan);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 8px 15px rgba(245, 158, 11, 0.2);
}

.sidebar-link.active .sidebar-label {
    color: #fff;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 20px 0;
}

.dash-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    body.dash-body { 
        display: block !important;
        height: auto !important; 
        min-height: 100vh !important;
        overflow-x: hidden !important; 
        transform: none !important; 
        filter: none !important;
        perspective: none !important;
        position: relative !important;
    }
    body.dash-body > aside.dash-sidebar { 
        width: 100% !important;
        max-width: 100vw !important;
        height: 65px !important; 
        padding: 0 !important; 
        position: fixed !important; 
        bottom: 0 !important; 
        left: 0 !important; 
        right: 0 !important;
        top: auto !important;
        margin: 0 !important;
        border-right: none !important; 
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important; 
        background: rgba(10, 14, 23, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        flex-direction: row !important;
        justify-content: center !important;
        display: flex !important;
        z-index: 9999 !important;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
        transform: translateZ(0) !important;
    }
    .sidebar-logo { display: none !important; }
    .sidebar-nav { 
        flex-direction: row !important; 
        justify-content: space-around !important; 
        width: 100% !important; 
        gap: 0 !important; 
        padding: 0 10px !important; 
        align-items: center !important; 
        height: 100% !important;
    }
    .sidebar-link { width: 52px !important; height: 50px !important; border-radius: 12px !important; gap: 2px !important; }
    .sidebar-link .sidebar-label { font-size: 0.44rem !important; display: none !important; }
    .sidebar-bottom { display: none !important; }

    .dash-content-area { 
        padding-bottom: 120px !important; 
        width: 100% !important; 
        min-height: 100vh !important;
        display: block !important;
        margin: 0 !important;
        position: relative !important;
    }
    
    .v3-layout { height: auto !important; overflow: visible !important; }
    .dash-scroll-container { overflow: visible !important; height: auto !important; padding: 15px 12px !important; }
    
    .v3-metrics-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    .v3-main-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .v3-footer-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .v3-form-grid { grid-template-columns: 1fr !important; padding: 15px !important; }

    .user-profile-v3 { padding: 4px 8px !important; min-width: 44px; min-height: 44px; justify-content: center; }
    .v3-user-meta { display: none; }
    .dropdown-menu { width: calc(100vw - 30px) !important; max-width: 320px; right: 15px !important; max-height: 80vh; overflow-y: auto; }
}

@media (max-width: 480px) {
    .v3-topbar { padding: 0 12px; height: 56px; }
    .page-title { font-size: 0.85rem; letter-spacing: 0.5px; }
    .v3-breadcrumb { display: none; }
    .topbar-actions { gap: 6px; }
    .topbar-actions .v3-btn-stake,
    .topbar-actions .v3-btn-withdraw { min-width: 72px; padding: 6px 8px; }
    .user-profile-v3 { padding: 3px 6px; min-width: 40px; }
    .v3-avatar { width: 30px; height: 30px; }
    
    .metric-card { padding: 16px; min-height: unset; }
    .metric-value { font-size: 1.2rem; }
    .metric-icon { width: 38px; height: 38px; font-size: 1rem; }
    
    .card-header-v3 { padding: 15px 18px; }
    .card-header-v3 h3 { font-size: 0.95rem; }
    .staking-body-v3 { padding: 15px; }
}


/* ============================================
   PREMIUM DEPOSIT MODAL
   ============================================ */
.dep-modal {
    background: rgba(10, 12, 20, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    padding: 32px 28px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.08), 0 0 120px rgba(20, 184, 166, 0.06);
    max-height: 90vh;
    overflow-y: auto;
}
.dep-modal::-webkit-scrollbar { width: 4px; }
.dep-modal::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.2); border-radius: 4px; }

.modal-overlay.active .dep-modal {
    transform: translateY(0);
}

.dep-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
}
.dep-close:hover { background: rgba(244, 63, 122, 0.1); color: #f43f7a; border-color: rgba(244, 63, 122, 0.3); }

/* Header */
.dep-header { text-align: center; margin-bottom: 20px; }
.dep-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(20, 184, 166, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.dep-header h3 { color: #fff; font-family: var(--font-heading); font-size: 1.25rem; margin: 0 0 6px; }
.dep-header p { color: var(--text-muted); font-size: 0.82rem; margin: 0; }

/* Platform Wallet modal */
.wallet-modal { max-width: 460px; }
.wallet-modal .wallet-fields-grid { gap: 18px; }
.wallet-modal .input-v3 input { font-size: 0.8rem; }

/* Network Selector */
.dep-network-row {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}
.dep-net-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.dep-net-btn:hover { color: #fff; }
.dep-net-btn.active {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.1);
}

/* QR Section */
.dep-qr-section { text-align: center; margin-bottom: 20px; }

.dep-qr-frame {
    position: relative;
    display: inline-block;
    padding: 14px;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}
.dep-qr-frame img { display: block; border-radius: 8px; width: 160px; height: 160px; }

.dep-qr-corners { position: absolute; inset: 0; pointer-events: none; }
.dep-qr-corners .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-cyan);
    border-style: solid;
    border-width: 0;
}
.dep-qr-corners .corner.tl { top: -3px; left: -3px; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.dep-qr-corners .corner.tr { top: -3px; right: -3px; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.dep-qr-corners .corner.bl { bottom: -3px; left: -3px; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.dep-qr-corners .corner.br { bottom: -3px; right: -3px; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }

/* Address Box */
.dep-address-box {
    display: flex;
    gap: 8px;
    max-width: 360px;
    margin: 0 auto 12px;
}
.dep-address-box input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--accent-cyan);
    padding: 10px 14px;
    border-radius: 10px;
    font-family: var(--font-alt);
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    text-overflow: ellipsis;
}
.dep-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-cyan);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.dep-copy-btn:hover { background: rgba(245, 158, 11, 0.15); }

/* Warning */
.dep-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 165, 0, 0.06);
    border: 1px solid rgba(255, 165, 0, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto;
}
.dep-warning strong { color: #ffa500; }
.dep-warning svg { flex-shrink: 0; }

/* Divider */
.dep-divider {
    text-align: center;
    margin: 20px 0 16px;
    position: relative;
}
.dep-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}
.dep-divider span {
    position: relative;
    background: rgba(10, 12, 20, 0.96);
    padding: 0 14px;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Method Cards */
.dep-methods { display: flex; flex-direction: column; gap: 10px; }
.dep-method-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    transition: border-color 0.2s;
}
.dep-method-card:hover { border-color: rgba(245, 158, 11, 0.12); }
.dep-method-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}
.dep-method-icon { font-size: 1.1rem; }
.dep-method-form { display: flex; gap: 8px; }

.dep-badge-instant {
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(245,158,11,0.1));
    border: 1px solid rgba(245,158,11,0.4);
    color: var(--accent-cyan);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 3px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.dep-guide-steps {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dep-guide-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.dep-guide-steps li strong { color: var(--accent-cyan); }
.dep-guide-steps li span {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--accent-cyan);
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dep-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.dep-input:focus { outline: none; border-color: rgba(245, 158, 11, 0.3); }
.dep-input.full { width: 100%; margin-bottom: 10px; }

.dep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.dep-btn.metamask {
    background: linear-gradient(135deg, #f6851b, #e2761b);
    color: #fff;
    min-width: 100px;
}
.dep-btn.metamask:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(246, 133, 27, 0.3); }
.dep-btn.verify {
    background: linear-gradient(135deg, #f59e0b, #00d2ff);
    color: #000;
    width: 100%;
}
.dep-btn.verify:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); }

/* Scanner */
.dep-scanner { text-align: center; padding: 30px 0; }
.dep-scanner-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: depSpin 1s linear infinite;
}
@keyframes depSpin { to { transform: rotate(360deg); } }
.dep-scanner p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 14px; }

.dep-progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    max-width: 260px;
    margin: 0 auto;
}
.dep-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Success */
.dep-success { text-align: center; padding: 30px 0 10px; }
.dep-success-icon { font-size: 3rem; margin-bottom: 12px; }
.dep-success h4 { color: #fff; font-size: 1.1rem; margin: 0 0 6px; }
.dep-success p { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 20px; }

/* Responsive */
@media (max-width: 500px) {
    .dep-modal { padding: 22px 18px; margin: 10px; border-radius: 16px; }
    .dep-qr-frame img { width: 130px; height: 130px; }
    .dep-address-box { flex-direction: column; }
    .dep-copy-btn { justify-content: center; }
    .dep-method-form { flex-direction: column; }
    .dep-btn.metamask { width: 100%; }
}

/* ============================================
   WALLET CONNECT — DASHBOARD CARD
   ============================================ */
.wc-section { margin-top: 16px; }
.wc-card { padding: 20px 24px !important; }
.wc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.wc-card-header h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #fff;
    margin: 0;
}
.wc-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: var(--accent-cyan);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s;
}
.wc-add-btn:hover { background: rgba(245, 158, 11, 0.12); transform: translateY(-1px); }

.wc-list { min-height: 50px; }

.wc-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Linked wallet items */
.wc-linked-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.wc-linked-item:hover { border-color: rgba(245, 158, 11, 0.18); }
.wc-linked-item img { width: 28px; height: 28px; border-radius: 6px; }
.wc-linked-item .wc-item-info { flex: 1; }
.wc-linked-item .wc-item-name { font-size: 0.85rem; color: #fff; font-weight: 600; }
.wc-linked-item .wc-item-addr {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-family: var(--font-alt);
    letter-spacing: 0.3px;
}
.wc-linked-item .wc-disconnect-btn {
    background: rgba(244, 63, 122, 0.08);
    border: 1px solid rgba(244, 63, 122, 0.15);
    color: #f43f7a;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.wc-linked-item .wc-disconnect-btn:hover { background: rgba(244, 63, 122, 0.15); }

/* ============================================
   WALLET CONNECT — MODAL
   ============================================ */
.wc-modal {
    background: rgba(10, 12, 20, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(20, 184, 166, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 60px rgba(20, 184, 166, 0.08), 0 0 120px rgba(245, 158, 11, 0.04);
}
.modal-overlay.active .wc-modal { transform: translateY(0); }

.wc-providers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.wc-provider-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.wc-provider-btn:hover {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.15);
    transform: translateX(4px);
}
.wc-provider-btn img { flex-shrink: 0; }
.wc-prov-info { flex: 1; }
.wc-prov-info strong { display: block; color: #fff; font-size: 0.88rem; margin-bottom: 2px; }
.wc-prov-info span { font-size: 0.72rem; color: var(--text-muted); }
.wc-prov-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
}
.wc-provider-btn:hover .wc-prov-arrow { color: var(--accent-cyan); transform: translateX(3px); }

/* Connecting State */
.wc-connecting {
    text-align: center;
    padding: 30px 0 10px;
}
.wc-connecting p { color: var(--text-secondary); font-size: 0.88rem; margin-top: 0; }

/* Connected State */
.wc-connected {
    text-align: center;
    padding: 20px 0 10px;
}
.wc-connected h4 { color: #fff; font-size: 1.05rem; margin: 8px 0 4px; }
.wc-linked-addr {
    font-family: var(--font-alt);
    color: var(--accent-cyan);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    margin-bottom: 18px !important;
    background: rgba(245, 158, 11, 0.05);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.12);
}

@media (max-width: 500px) {
    .wc-modal { padding: 22px 18px; margin: 10px; }
    .wc-card-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .wc-provider-btn { padding: 10px 12px; gap: 10px; }
}

/* ============================================
   Settings Page — Toggle Switches
   ============================================ */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.settings-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

.settings-toggle input:checked + .settings-toggle-slider::before {
    transform: translateX(20px);
    background: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Settings page responsive */
@media (max-width: 768px) {
    .v3-main-grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Staking — Locked/Closed Overlay
   ============================================ */
.feature-staking {
    position: relative;
    overflow: hidden;
}

.staking-locked-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 280px;
    padding: 40px 24px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 59, 48, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(20, 184, 166, 0.04) 0%, transparent 60%);
}

.staking-locked-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.01) 20px,
        rgba(255, 255, 255, 0.01) 21px
    );
    pointer-events: none;
}

.staking-locked-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.staking-locked-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.15);
    margin-bottom: 20px;
    color: rgba(255, 59, 48, 0.6);
    animation: lockedPulse 3s ease-in-out infinite;
}

@keyframes lockedPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.1); }
    50% { box-shadow: 0 0 30px 8px rgba(255, 59, 48, 0.08); }
}

.staking-locked-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.staking-locked-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 20px;
}

.staking-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 59, 48, 0.8);
}

.pulse-dot.red {
    background: #ff3b30;
    box-shadow: 0 0 6px rgba(255, 59, 48, 0.6);
}

/* Dashboard Action Buttons (v3) */
.v3-btn-stake {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 136px;
    line-height: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.v3-btn-stake:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

.v3-btn-stake .btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.v3-btn-withdraw {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.15), rgba(255, 165, 0, 0.05));
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.v3-btn-withdraw:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.25), rgba(255, 165, 0, 0.1));
    border-color: #ffa500;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.15);
}

/* Platform Wallet collapsible */
#walletBody {
    overflow: hidden;
    padding: 0 24px 20px;
}

#walletBody.collapsed {
    display: none;
}

.wallet-chevron {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.wallet-chevron.open {
    transform: rotate(180deg);
}

.v3-btn-refresh {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1.1rem;
}

.v3-btn-refresh:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.v3-btn-refresh:active .refresh-icon {
    animation: btn-spin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes btn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Global Preloader Redundancy - ensures loader fades on strict caches */
#global-preloader {
  transition: opacity 0.5s ease;
}
#global-preloader.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Mini Pool Cards (Withdrawal Sidebar) */
.mini-pools-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-pool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-pool-card:hover {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateX(4px);
}

.mp-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.mp-info {
    flex: 1;
}

.mp-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mp-apy {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 700;
    font-family: var(--font-alt);
}

.mp-action {
    text-align: right;
}

.mp-tag {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Sidebar Discovery Button (Vibrant Restore) */
.staking-footer-v3 {
    padding: 15px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: center;
}

.v3-btn-discover {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #06060d;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.v3-btn-discover:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
    filter: brightness(1.15);
}

.v3-btn-discover .discover-arrow {
    font-size: 1rem;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.v3-btn-discover:hover .discover-arrow {
    transform: translateX(8px);
}

/* Staking Panel Lock Styling */
.staking-lock-overlay {
    padding: 30px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px dashed rgba(245, 158, 11, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    margin: 10px 0;
}

.lock-icon-v3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3));
}

.staking-lock-overlay h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.staking-lock-overlay p {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.lock-status-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(245, 158, 11, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    letter-spacing: 1px;
}

/* Urgency Staking (FOMO) Styles */
.mp-timer {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
    border-radius: 4px;
    display: inline-block;
}

.mp-scarcity {
    margin-top: 8px;
    text-align: right;
}

.mp-progress-bg {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-left: auto;
    margin-bottom: 4px;
}

.mp-progress-fill {
    height: 100
/* Urgency Staking (FOMO) Styles */
.mp-timer {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
    border-radius: 4px;
    display: inline-block;
}

.mp-scarcity {
    margin-top: 8px;
    text-align: right;
}

.mp-progress-bg {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-left: auto;
    margin-bottom: 4px;
}

.mp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #14b8a6);
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.mp-slots-left {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Extreme Urgency Animation */
.mini-pool-card.urgent-pulse {
    border-color: rgba(255, 149, 0, 0.3) !important;
    animation: urgentGlow 2s ease-in-out infinite;
}

@keyframes urgentGlow {
    0% { box-shadow: 0 0 5px rgba(255, 149, 0, 0.1); }
    50% { box-shadow: 0 0 15px rgba(255, 149, 0, 0.2); }
    100% { box-shadow: 0 0 5px rgba(255, 149, 0, 0.1); }
}

/* --- HYPER-FOMO EXTREME --- */

@keyframes hotFlame {
    0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 5px #ff5e00) brightness(1); }
    50% { transform: scale(1.1) translateY(-2px); filter: drop-shadow(0 0 12px #ffbb00) brightness(1.3); }
    100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 5px #ff5e00) brightness(1); }
}

.hot-flame-icon {
    animation: hotFlame 0.8s infinite ease-in-out;
    color: #ff8c00 !important;
    font-size: 1.2rem;
    margin-right: 6px;
    display: inline-block;
}

@keyframes extremePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4), 0 0 0 0 rgba(249, 115, 22, 0.2); border-color: rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 15px 5px rgba(239, 68, 68, 0.6), 0 0 25px 10px rgba(249, 115, 22, 0.3); border-color: #ef4444; }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4), 0 0 0 0 rgba(249, 115, 22, 0.2); border-color: rgba(239, 68, 68, 0.5); }
}

.extreme-urgency-card {
    animation: extremePulse 1s infinite ease-in-out !important;
    background: linear-gradient(135deg, rgba(40, 0, 0, 0.4), rgba(15, 23, 42, 0.95)) !important;
    transform: scale(1.02);
    z-index: 10;
}

@keyframes standardUrgent {
    0% { border-color: rgba(255, 149, 0, 0.3); box-shadow: 0 0 5px rgba(255, 149, 0, 0.1); }
    50% { border-color: rgba(255, 149, 0, 0.8); box-shadow: 0 0 12px rgba(255, 149, 0, 0.3); }
    100% { border-color: rgba(255, 149, 0, 0.3); box-shadow: 0 0 5px rgba(255, 149, 0, 0.1); }
}

.urgent-pulse {
    animation: standardUrgent 2s infinite ease-in-out;
}


@keyframes shimmerSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.shimmer-progress-fill {
    position: relative !important;
    overflow: hidden !important;
}

.shimmer-progress-fill::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmerSweep 1.2s infinite linear;
}

.live-watchers {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-weight: 500;
}

.watcher-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: watcherPulse 1.5s infinite;
}

@keyframes watcherPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- PROFIT INDICATOR ---------- */
.profit-up {
    color: #00d97e !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    text-shadow: 0 0 12px rgba(0, 217, 126, 0.45);
    animation: profitGlow 1.8s ease-out;
}
.profit-up::before {
    content: "▲";
    font-size: 0.7em;
    color: #00d97e;
    text-shadow: 0 0 8px rgba(0, 217, 126, 0.9);
    animation: profitArrowBounce 1.6s ease-out;
}
@keyframes profitGlow {
    0%   { text-shadow: 0 0 0 rgba(0, 217, 126, 0); transform: scale(0.85); opacity: 0; }
    40%  { text-shadow: 0 0 22px rgba(0, 217, 126, 0.95); transform: scale(1.08); opacity: 1; }
    100% { text-shadow: 0 0 12px rgba(0, 217, 126, 0.45); transform: scale(1); opacity: 1; }
}
@keyframes profitArrowBounce {
    0%, 100% { transform: translateY(0); }
    25%      { transform: translateY(-3px); }
    50%      { transform: translateY(0); }
    75%      { transform: translateY(-1px); }
}

/* Row-level flash when a profit row enters */
tr.profit-row-flash {
    animation: profitRowFlash 1.4s ease-out;
}
@keyframes profitRowFlash {
    0%   { background: linear-gradient(90deg, transparent, rgba(0, 217, 126, 0.18), transparent); box-shadow: inset 0 0 18px rgba(0, 217, 126, 0.15); }
    100% { background: transparent; box-shadow: inset 0 0 0 rgba(0, 217, 126, 0); }
}

/* Floating +amount badge that pops up and drifts */
.profit-floater {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00d97e, #00a85f);
    color: #062a17;
    font-weight: 900;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 217, 126, 0.55), 0 0 0 1px rgba(255,255,255,0.2) inset;
    pointer-events: none;
    z-index: 10;
    animation: profitFloater 2.2s ease-out forwards;
}
@keyframes profitFloater {
    0%   { opacity: 0; transform: translate(-50%, 6px) scale(0.7); }
    15%  { opacity: 1; transform: translate(-50%, -2px) scale(1.05); }
    30%  { opacity: 1; transform: translate(-50%, -8px) scale(1); }
    80%  { opacity: 1; transform: translate(-50%, -30px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -42px) scale(0.95); }
}





/* ============================================================
   Profit Engine — per-package sections (Silver / Gold / Platinum)
   ============================================================ */
.pe-section {
  margin-top: 18px;
  padding-top: 4px;
}
.pe-section:first-child { margin-top: 4px; }

.pe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.pe-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.pe-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  flex-shrink: 0;
}
.pe-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.6px;
}
.pe-range {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.pe-you {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}
.pe-lock-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-muted);
}
.pe-unlock {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 6px 13px;
  border-radius: 9px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition, 0.2s ease);
}
.pe-unlock:hover { background: rgba(245, 158, 11, 0.16); transform: translateY(-1px); }

.pe-cards { display: block; }

.pe-section.is-locked .trade-card {
  opacity: 0.55;
  filter: saturate(0.6);
}
.pe-section.is-locked .trade-card .price-val,
.pe-section.is-locked .trade-card .profit-val { opacity: 0.8; }

.trade-card-btn.is-locked {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-cyan, #f59e0b);
}
.trade-card-btn.is-locked:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.6);
}

@media (max-width: 600px) {
  .pe-head { padding: 9px 11px; }
  .pe-range { font-size: 0.66rem; }
  .pe-unlock { font-size: 0.66rem; padding: 5px 10px; }
}

/* Staking category tabs on earn.html */
#stakeTabs { display: inline-flex; margin: 14px 0 6px; }
#stakeTabs[style*="none"] { display: none !important; }


/* Engine hex icon */
.eng-hex {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: radial-gradient(120% 120% at 50% 30%, rgba(245,158,11,0.18), rgba(245,158,11,0.08) 60%, transparent 70%), rgba(255,255,255,0.04);
    border: 1px solid rgba(245,158,11,0.28);
    box-shadow: 0 6px 18px rgba(245,158,11,0.22), inset 0 1px 0 rgba(255,255,255,0.2);
    color: var(--accent-cyan);
    transform: rotate(0deg);
    transition: transform 0.6s ease, box-shadow 0.3s ease;
}
.eng-hex svg { display: block; }
.eng-avatar:hover .eng-hex { transform: rotate(6deg); box-shadow: 0 8px 22px rgba(245,158,11,0.28); }
