/* =============================================
   Indogets – Core Styles
   ============================================= */

:root {
    --primary: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #EF5350;
    --primary-bg: rgba(211,47,47,0.06);
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border: #E8ECF2;
    --card-bg: #FFFFFF;
    --body-bg: #F0F4F8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 36px rgba(0,0,0,0.12);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: all 0.22s cubic-bezier(.4,0,.2,1);
}

/* Final Market Chart mobile mockup lock */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background: #fff;
    }

    body:has(.market-chart-page) * {
        box-sizing: border-box;
    }

    .app-wrapper:has(.market-chart-page) {
        position: relative;
        background:
            radial-gradient(circle at 9% 19%, rgba(239, 35, 60, .14), transparent 22%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 130 42 112 70 126 105 82 132 96 165 38 192 52 220 15' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.20'/%3E%3Cpath d='M28 150 62 136 90 148 122 108 150 120 182 76 214 92' fill='none' stroke='%23EF233C' stroke-width='1.5' opacity='.13'/%3E%3C/svg%3E") right 86px / 165px 135px no-repeat,
            radial-gradient(circle at 14% 18%, rgba(239, 35, 60, .045) 0 1px, transparent 1.2px) 0 0 / 8px 8px,
            #fff;
        overflow: hidden;
    }

    .app-wrapper:has(.market-chart-page)::before {
        display: none;
    }

    .app-wrapper:has(.market-chart-page) .page-content {
        width: 100%;
        max-width: 430px;
        min-height: 100vh;
        margin: 0 auto;
        padding: 0 20px 96px;
        overflow-x: hidden;
        background: transparent;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 46px;
        margin: 22px 0 18px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: transparent;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand {
        gap: 8px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 24px;
        height: 24px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
        font-size: 24px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.55px;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .d-flex.align-items-center {
        gap: 10px !important;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info {
        line-height: 1.05;
        text-align: right;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 9px;
        line-height: 1.05;
        color: #8A94A6;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.05;
        font-weight: 700;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .online-dot {
        width: 5px;
        height: 5px;
        margin-left: 3px;
        background: #EF233C;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid #EEF1F6;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
    }

    .market-chart-page {
        width: 100%;
        min-height: auto;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        color: #06142E;
        font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .market-chart-page .page-header {
        display: flex;
        justify-content: center;
        text-align: center;
        padding: 10px 0 16px;
        margin: 0;
    }

    .market-chart-page .page-header .ph-title {
        margin: 0;
        font-size: 25px;
        line-height: 1.15;
        font-weight: 700;
        letter-spacing: -.45px;
        color: #06142E;
    }

    .market-chart-page .page-header .ph-subtitle {
        margin: 6px 0 0;
        font-size: 13px;
        line-height: 1.3;
        color: #8A94A6;
    }

    .market-chart-page .page-header .text-primary {
        color: #EF233C !important;
        font-weight: 600;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border: 0;
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    }

    .market-chart-page .chart-header-card {
        height: 76px;
        padding: 10px 14px;
        margin-bottom: 14px;
        border-radius: 18px;
        display: flex;
        align-items: center;
    }

    .market-chart-page .chart-coin-info {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 58px 118px minmax(0, 1fr) 62px;
        align-items: center;
        column-gap: 10px;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        border-radius: 50%;
        font-size: 26px !important;
        font-weight: 800 !important;
    }

    .market-chart-page .chart-header-card .flex-grow-1 {
        min-width: 0;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 108px !important;
        height: 32px;
        min-height: 32px;
        padding: 0 22px 0 12px !important;
        border: 1px solid #EEF1F6 !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        line-height: 32px;
        font-weight: 700 !important;
        color: #06142E;
        box-shadow: none !important;
    }

    .market-chart-page .chart-header-card span {
        display: block;
        margin-top: 5px;
        font-size: 10px !important;
        line-height: 1;
        color: #8A94A6 !important;
    }

    .market-chart-page .chart-header-card .text-end {
        min-width: 0;
        text-align: right !important;
    }

    .market-chart-page .chart-price {
        font-size: 24px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: -.5px;
        color: #06142E;
        white-space: nowrap;
    }

    .market-chart-page .chart-approx {
        margin-top: 4px;
        font-size: 11px;
        line-height: 1.1;
        color: #8A94A6;
        white-space: nowrap;
    }

    .market-chart-page .chart-header-card .ms-3 {
        min-width: 0;
        margin-left: 0 !important;
        text-align: right;
        line-height: 1.15;
    }

    .market-chart-page .chart-change {
        font-size: 12px;
        line-height: 1.15;
        font-weight: 700;
        color: #EF233C !important;
        white-space: nowrap;
    }

    .market-chart-page .chart-change + div {
        margin-top: 4px;
        font-size: 9px !important;
        line-height: 1.1;
        color: #8A94A6 !important;
    }

    .market-chart-page .chart-panel-card {
        height: 310px;
        border-radius: 20px;
        padding: 14px;
        margin-bottom: 10px !important;
        overflow: hidden;
    }

    .market-chart-page .chart-panel-card .card-body {
        height: 100%;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .market-chart-page .chart-toolbar {
        height: 38px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 8px;
        flex: 0 0 38px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 36px;
        padding: 3px;
        border-radius: 11px;
        background: #F6F7FA;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
    }

    .market-chart-page .tr-tab {
        height: 30px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 500;
        color: #34425F;
        text-decoration: none;
    }

    .market-chart-page .tr-tab.active {
        background: #FFE3E8;
        color: #EF233C;
        font-weight: 600;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    .market-chart-page .chart-type-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 12px;
        border: 1px solid #EEF1F6;
        background: #fff;
        color: #667085;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        border-color: #EF233C;
        color: #EF233C;
    }

    .market-chart-page .crypto-chart-surface {
        height: 236px;
        min-height: 236px;
        max-height: 236px;
        width: 100%;
        flex: 0 0 236px;
        position: relative;
        overflow: hidden;
        border-radius: 14px;
    }

    .market-chart-page #cryptoChart,
    .market-chart-page #cryptoChart svg,
    .market-chart-page #cryptoChart canvas,
    .market-chart-page #cryptoChart .apexcharts-canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        overflow: hidden;
    }

    .market-chart-page #cryptoChart text {
        font-size: 15px;
    }

    .market-chart-page .chart-stats-row {
        height: 82px;
        border-radius: 16px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        padding: 10px 12px;
        margin: 0 0 8px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .chart-stat-col {
        display: grid;
        gap: 0;
        align-content: start;
        padding: 0 10px;
        min-width: 0;
    }

    .market-chart-page .chart-stat-col:first-child {
        padding-left: 0;
    }

    .market-chart-page .chart-stat-col:last-child {
        padding-right: 0;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F6;
    }

    .market-chart-page .cs-label {
        margin: 0;
        font-size: 9px;
        line-height: 1.1;
        color: #8A94A6;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        margin: 3px 0 8px;
        font-size: 11px;
        line-height: 1.15;
        font-weight: 700;
        color: #06142E;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        height: 62px;
        border-radius: 16px;
        padding: 10px 14px;
        margin: 0 0 14px !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .bs-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0 0 9px;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        font-size: 11px;
        line-height: 1;
        color: #EF233C;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 38px 1fr;
        align-items: center;
        gap: 8px;
    }

    .market-chart-page .bs-track {
        height: 8px;
        border-radius: 999px;
        background: #FFD3DA;
        overflow: hidden;
    }

    .market-chart-page .bs-track-fill {
        height: 100%;
        border-radius: 999px;
        background: #EF233C;
    }

    .market-chart-page .sell-fill {
        background: #F58B9A;
    }

    .market-chart-page .sentiment-ring {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 56.71%, #FFD3DA 56.71% 100%);
        position: relative;
    }

    .market-chart-page .sentiment-ring::after {
        content: "";
        position: absolute;
        inset: 9px;
        border-radius: 50%;
        background: #fff;
    }

    .bottom-nav.chart-nav {
        position: fixed;
        left: max(20px, calc((100vw - 430px) / 2 + 20px));
        right: max(20px, calc((100vw - 430px) / 2 + 20px));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: 66px;
        border-radius: 16px;
        padding: 0;
        background: #fff;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        align-items: center;
        z-index: 50;
        box-shadow: 0 -8px 28px rgba(15, 23, 42, .12);
    }

    .bottom-nav.chart-nav .nav-item,
    .bottom-nav.chart-nav .deposit-btn-wrap {
        min-width: 0;
    }

    .bottom-nav.chart-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: #91A0B8;
        font-size: 10px;
        font-weight: 500;
        text-decoration: none;
    }

    .bottom-nav.chart-nav .nav-item.active {
        color: #EF233C;
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 20px;
        line-height: 1;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 10px;
        line-height: 1;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 44px;
        height: 44px;
        margin: 0;
        top: auto;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #6B7280;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        font-size: 28px;
        line-height: 1;
        color: #6B7280;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        font-size: 10px;
        line-height: 1;
        font-weight: 500;
        color: #91A0B8;
    }
}

@media (max-width: 390px) {
    .app-wrapper:has(.market-chart-page) .page-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-wrapper:has(.market-chart-page) {
        background-size: auto, 150px 126px, 8px 8px, auto;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        margin-top: 20px;
        margin-bottom: 16px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 22px;
        height: 22px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 22px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 8.5px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 10.5px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 40px;
        height: 40px;
    }

    .market-chart-page .page-header {
        padding-top: 8px;
        padding-bottom: 14px;
    }

    .market-chart-page .page-header .ph-title {
        font-size: 24px;
    }

    .market-chart-page .page-header .ph-subtitle {
        font-size: 12.5px;
    }

    .market-chart-page .chart-header-card {
        grid-template-columns: none;
        padding: 10px 12px;
    }

    .market-chart-page .chart-coin-info {
        grid-template-columns: 54px 104px minmax(0, 1fr) 56px;
        column-gap: 8px;
    }

    .market-chart-page .chart-coin-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 104px !important;
        font-size: 12px !important;
        padding-left: 10px !important;
    }

    .market-chart-page .chart-price {
        font-size: 22px;
    }

    .market-chart-page .chart-approx {
        font-size: 10.5px;
    }

    .market-chart-page .chart-change {
        font-size: 11px;
    }

    .market-chart-page .chart-panel-card {
        height: 300px;
    }

    .market-chart-page .crypto-chart-surface {
        height: 226px;
        min-height: 226px;
        max-height: 226px;
        flex-basis: 226px;
    }

    .market-chart-page .chart-stat-col {
        padding-left: 8px;
        padding-right: 8px;
    }

    .market-chart-page .cs-label {
        font-size: 8.5px;
    }

    .market-chart-page .cs-value {
        font-size: 10.5px;
    }

    .bottom-nav.chart-nav {
        left: 16px;
        right: 16px;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--body-bg);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* =============================================
   Layout
   ============================================= */

.app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--body-bg);
    position: relative;
    padding-bottom: 80px;
}

@media (min-width: 992px) {
    .app-wrapper { max-width: 100%; display: flex; }
    .sidebar { width: 260px; min-height: 100vh; background: var(--card-bg); border-right: 1px solid var(--border); flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; }
    .main-content { margin-left: 260px; flex: 1; padding: 0; }
    .bottom-nav { display: none !important; }
    .top-bar { padding: 20px 32px; }
    .page-content { padding: 0 32px 32px; }
}

@media (max-width: 991px) {
    .sidebar { display: none; }
    .main-content { width: 100%; }
    .top-bar { padding: 14px 20px; }
    .page-content { padding: 0 16px 16px; }
}

/* =============================================
   Sidebar
   ============================================= */

.sidebar-logo { padding: 28px 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo .brand { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .brand-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.sidebar-logo .brand-name { font-size: 20px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.5px; }

.sidebar-nav { padding: 16px 12px; }
.sidebar-nav .nav-section-title { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 4px; margin-top: 8px; }
.sidebar-nav .nav-item { margin-bottom: 2px; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; font-size: 14px; transition: var(--transition); }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: var(--primary-bg); color: var(--primary); }
.sidebar-nav .nav-link i { width: 18px; text-align: center; font-size: 16px; }
.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border); position: absolute; bottom: 0; left: 0; right: 0; }

/* =============================================
   Top Bar
   ============================================= */

.top-bar {
    background: var(--card-bg);
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.top-bar .brand { display: flex; align-items: center; gap: 10px; }
.top-bar .brand-icon-sm { width: 34px; height: 34px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.top-bar .brand-name { font-size: 18px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.5px; }
.top-bar .user-info { text-align: right; }
.top-bar .user-info .welcome { font-size: 11px; color: var(--text-muted); }
.top-bar .user-info .username { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.top-bar .avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--card-bg); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
.top-bar .avatar-btn:hover { border-color: var(--primary); background: var(--primary-bg); }
.top-bar .avatar-btn i { font-size: 18px; color: var(--text-muted); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; margin-left: 3px; }

/* =============================================
   Bottom Nav
   ============================================= */

.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: var(--card-bg); border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 200; box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}
.bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; cursor: pointer; color: var(--text-light); text-decoration: none; transition: var(--transition); }
.bottom-nav .nav-item:hover, .bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item i { font-size: 20px; }
.bottom-nav .nav-item span { font-size: 10px; font-weight: 500; }
.bottom-nav .deposit-btn-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.bottom-nav .deposit-fab { width: 52px; height: 52px; background: var(--primary); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 2px; text-decoration: none; box-shadow: 0 4px 18px rgba(211,47,47,0.38); margin-top: -22px; transition: var(--transition); }
.bottom-nav .deposit-fab:hover { background: var(--primary-dark); color: #fff; transform: scale(1.05); }
.bottom-nav .deposit-fab i { font-size: 20px; }
.bottom-nav .deposit-fab span { font-size: 9px; font-weight: 600; }

/* =============================================
   Cards (base)
   ============================================= */

.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }

.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.stat-card .sub { font-size: 12px; margin-top: 4px; }

/* =============================================
   Balance Card
   ============================================= */

.balance-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.balance-card .bg-chart-wrap {
    position: absolute; top: 0; right: -10px; width: 52%; height: 100%;
    pointer-events: none; opacity: 1;
}
.balance-card .total-label { font-size: 12px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.balance-card .total-amount { font-size: 34px; font-weight: 800; letter-spacing: -2px; line-height: 1.1; margin: 6px 0 3px; color: var(--text-dark); position: relative; z-index: 1; }
.balance-card .total-usd { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; position: relative; z-index: 1; }
.balance-row { display: flex; gap: 10px; position: relative; z-index: 1; }
.balance-item { flex: 1; background: var(--body-bg); border-radius: 10px; padding: 10px 14px; }
.balance-item .bi-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.balance-item .bi-value { font-size: 14px; font-weight: 700; margin-top: 2px; color: var(--text-dark); }

/* =============================================
   Profit Card
   ============================================= */

.profit-card { background: var(--card-bg); border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.profit-card .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; background: transparent; border: none; padding: 0; }
.profit-card .card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text-dark); }
.profit-card .card-title i { color: var(--primary); }
.profit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.profit-item { padding: 4px 0; }
.profit-item .pi-label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.profit-item .pi-value { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.profit-item .pi-pct { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 2px; }

/* =============================================
   Performance Card
   ============================================= */

.perf-card { background: var(--card-bg); border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.perf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.perf-item .pf-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; font-weight: 500; }
.perf-item .pf-value { font-size: 15px; font-weight: 800; color: var(--text-dark); }
.perf-item .pf-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.perf-item .pf-bar-fill { height: 100%; background: var(--primary); border-radius: 2px; }

/* =============================================
   Quick Actions
   ============================================= */

.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.action-btn { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 10px; text-align: center; text-decoration: none; color: var(--text-dark); transition: var(--transition); box-shadow: var(--shadow-sm); }
.action-btn:hover { border-color: rgba(211,47,47,0.3); color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.action-btn .ab-icon { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--body-bg); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 18px; color: var(--text-muted); transition: var(--transition); }
.action-btn:hover .ab-icon { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.action-btn .ab-label { font-size: 12px; font-weight: 700; color: var(--text-dark); }
.action-btn .ab-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* =============================================
   Market Tickers — horizontal scroll cards
   ============================================= */

.ticker-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ticker-scroll::-webkit-scrollbar { display: none; }

.ticker-card {
    flex: 0 0 auto; width: 160px;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 12px; text-decoration: none; color: var(--text-dark);
    transition: var(--transition); box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 6px;
}
.ticker-card:hover { border-color: rgba(211,47,47,0.25); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--text-dark); }

.ticker-card-top { display: flex; align-items: center; gap: 8px; }
.ticker-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex-shrink: 0; }
.ticker-pair { font-size: 12px; font-weight: 700; color: var(--text-dark); line-height: 1.2; }
.ticker-name { font-size: 10px; color: var(--text-muted); }

.ticker-card-mid { display: flex; align-items: flex-end; justify-content: space-between; }
.t-price-big { font-size: 15px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.3px; line-height: 1; }

.ticker-card-bot { display: flex; align-items: center; justify-content: space-between; }
.t-change { font-size: 12px; font-weight: 600; }
.t-change.positive { color: var(--success); }
.t-change.negative { color: var(--danger); }

/* =============================================
   Forms
   ============================================= */

.form-label { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; display: block; }
.form-control, .form-select { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--text-dark); background: #fff; width: 100%; transition: var(--transition); outline: none; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(211,47,47,0.08); }
.form-control::placeholder { color: var(--text-light); }

.input-group { position: relative; }
.input-group .form-control { padding-right: 80px; }
.input-group .input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.input-group .max-btn { background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; transition: var(--transition); }
.input-group .max-btn:hover { color: var(--primary-dark); }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.field-group { margin-bottom: 18px; }

.select-with-icon { position: relative; }
.select-with-icon .select-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; z-index: 1; }
.select-with-icon .form-select { padding-left: 48px; }

.fee-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fee-row .fee-label { font-size: 13px; color: var(--text-dark); display: flex; align-items: center; gap: 6px; }
.fee-row .fee-amount { text-align: right; }
.fee-row .fee-amount .amount { font-size: 14px; font-weight: 700; }
.fee-row .fee-amount .network { font-size: 11px; color: var(--primary); }

.receive-box { background: var(--primary-bg); border: 1.5px solid rgba(211,47,47,0.15); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.receive-box .rb-label { font-size: 13px; color: var(--text-dark); margin-bottom: 6px; }
.receive-box .rb-amount { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.receive-box .rb-coin-img { width: 64px; opacity: 0.85; }

.btn-primary-full { width: 100%; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); padding: 16px; font-size: 15px; font-weight: 700; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary-full:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(211,47,47,0.3); }
.btn-primary-full:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-outline-primary { border: 1.5px solid var(--primary); color: var(--primary); background: #fff; border-radius: var(--radius-sm); padding: 10px 20px; font-weight: 600; font-size: 14px; transition: var(--transition); cursor: pointer; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.safety-notice { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-muted); text-align: center; justify-content: center; padding: 12px 0; }
.safety-notice i { color: var(--success); font-size: 14px; flex-shrink: 0; }

.min-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-bg); border: 1px solid rgba(211,47,47,0.2); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--primary); font-weight: 500; }

/* =============================================
   Page Header
   ============================================= */

.page-header { display: flex; align-items: center; gap: 16px; padding: 16px 0 20px; }
.back-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--text-dark); font-size: 18px; text-decoration: none; transition: var(--transition); flex-shrink: 0; }
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-header .ph-title { font-size: 20px; font-weight: 700; }
.page-header .ph-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.page-header .ph-text { flex: 1; }

/* =============================================
   Table
   ============================================= */

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px; background: var(--body-bg); border-bottom: 1px solid var(--border); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0,0,0,0.015); }

.badge-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-status.pending { background: #FEF3C7; color: #92400E; }
.badge-status.confirmed, .badge-status.approved { background: #D1FAE5; color: #065F46; }
.badge-status.rejected { background: #FEE2E2; color: #991B1B; }

/* =============================================
   Deposit Address Box
   ============================================= */

.deposit-address-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; display: flex; align-items: center; gap: 14px; background: var(--body-bg); }
.deposit-address-box .qr-code { width: 64px; height: 64px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.deposit-address-box .addr-info { flex: 1; }
.deposit-address-box .addr-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.deposit-address-box .addr-text { font-size: 13px; font-weight: 600; word-break: break-all; color: var(--text-dark); }
.copy-btn { width: 36px; height: 36px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); flex-shrink: 0; }
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

.network-info { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.network-info i { color: var(--warning); }

/* =============================================
   Amount Chips
   ============================================= */

.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.amount-chip { padding: 6px 16px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); background: #fff; color: var(--text-dark); }
.amount-chip:hover, .amount-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* =============================================
   Chart Page
   ============================================= */

.chart-header-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.chart-coin-info { display: flex; align-items: center; gap: 12px; }
.chart-coin-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.chart-price { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.chart-approx { font-size: 13px; color: var(--text-muted); }
.chart-change { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }

.timerange-tabs { display: flex; gap: 4px; background: var(--body-bg); border-radius: var(--radius-sm); padding: 4px; }
.tr-tab { flex: 1; padding: 6px 8px; text-align: center; font-size: 13px; font-weight: 600; border-radius: 8px; cursor: pointer; border: none; background: none; color: var(--text-muted); transition: var(--transition); }
.tr-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.chart-type-btns { display: flex; gap: 4px; }
.chart-type-btn { width: 36px; height: 36px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.chart-type-btn.active, .chart-type-btn:hover { border-color: var(--primary); color: var(--primary); }

.chart-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.chart-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.chart-stat .cs-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.chart-stat .cs-value { font-size: 15px; font-weight: 700; }

.buy-sell-bar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.buy-sell-bar .bs-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.buy-sell-bar .buy-label { font-size: 13px; font-weight: 700; color: var(--success); }
.buy-sell-bar .sell-label { font-size: 13px; font-weight: 700; color: var(--danger); }
.bs-track { height: 8px; border-radius: 4px; background: rgba(239,68,68,0.2); overflow: hidden; }
.bs-track-fill { height: 100%; border-radius: 4px; background: var(--success); transition: width 0.5s ease; }
.bs-track-wrap { position: relative; }

/* =============================================
   History
   ============================================= */

.history-notice { background: var(--primary-bg); border: 1px solid rgba(211,47,47,0.15); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: var(--primary); display: flex; align-items: flex-start; gap: 8px; }
.summary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.summary-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); }
.summary-item .si-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.summary-item .si-value { font-size: 18px; font-weight: 700; color: var(--primary); }

/* =============================================
   Login Page
   ============================================= */

.auth-wrapper { min-height: 100vh; background: var(--body-bg); display: flex; align-items: stretch; }
.auth-left { flex: 1; background: linear-gradient(145deg, #fff 0%, var(--primary-bg) 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 40px; position: relative; overflow: hidden; }
.auth-left::before { content: ''; position: absolute; top: -80px; right: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(211,47,47,0.08) 0%, transparent 70%); }
.auth-right { width: 480px; max-width: 100%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 48px; }
@media (max-width: 768px) { .auth-left { display: none; } .auth-right { width: 100%; padding: 40px 24px; } }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-logo .logo-icon { width: 44px; height: 44px; background: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.auth-logo .logo-name { font-size: 26px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.5px; }
.auth-features { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 320px; }
.auth-feature { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; }
.auth-feature .af-icon { width: 36px; height: 36px; background: var(--primary-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 16px; flex-shrink: 0; }
.auth-feature .af-title { font-size: 13px; font-weight: 700; }
.auth-feature .af-sub { font-size: 11px; color: var(--text-muted); }
.auth-tagline { font-size: 28px; font-weight: 800; color: var(--text-dark); text-align: center; line-height: 1.2; margin-bottom: 32px; letter-spacing: -0.5px; }
.auth-tagline span { color: var(--primary); }
.auth-form-title { font-size: 24px; font-weight: 800; color: var(--text-dark); text-align: center; margin-bottom: 6px; }
.auth-form-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 32px; }
.auth-form-subtitle .red-line { width: 40px; height: 3px; background: var(--primary); border-radius: 2px; margin: 10px auto 0; }
.auth-input-group { position: relative; }
.auth-input-group .ai-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 15px; }
.auth-input-group .form-control { padding-left: 42px; }
.auth-input-group .eye-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--text-light); cursor: pointer; font-size: 16px; }
.remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.remember-row label { font-size: 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-row a { font-size: 13px; color: var(--primary); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-muted); }
.auth-security { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--body-bg); border-radius: var(--radius-sm); margin-top: 20px; }
.auth-security .as-text { font-size: 12px; color: var(--text-muted); }
.auth-security .as-badge { background: #D1FAE5; color: #065F46; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: flex; align-items: center; gap: 4px; }
.auth-footer-text { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 24px; }
.auth-footer-text strong { color: var(--text-dark); }

/* =============================================
   Admin
   ============================================= */

.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.admin-stat .as-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
.admin-stat .as-value { font-size: 24px; font-weight: 800; letter-spacing: -1px; }
.admin-stat .as-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-stat.danger { border-left: 4px solid var(--danger); }
.admin-stat.warning { border-left: 4px solid var(--warning); }
.admin-stat.success { border-left: 4px solid var(--success); }
.admin-stat.primary { border-left: 4px solid var(--primary); }
.admin-stat.info { border-left: 4px solid var(--info); }

.admin-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.admin-section .as-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.admin-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 768px) { .admin-charts-grid { grid-template-columns: 1fr; } }

/* Profile */
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; font-weight: 700; flex-shrink: 0; }
.profile-header { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--text-muted); }
.profile-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; gap: 12px; }
.profile-meta span { display: flex; align-items: center; gap: 4px; }
.security-badge { display: inline-flex; align-items: center; gap: 6px; background: #D1FAE5; color: #065F46; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* Alerts */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; border: 1px solid transparent; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.alert-danger { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.alert-info { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }

/* Pagination */
.pagination-row { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0; }
.page-btn { padding: 7px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.page-btn:hover, .page-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* Tabs */
.tab-bar { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-item { padding: 10px 20px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; text-decoration: none; transition: var(--transition); }
.tab-item.active { color: var(--primary); border-color: var(--primary); }

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-700 { font-weight: 700; }
.section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.section-title a { font-size: 12px; font-weight: 600; color: var(--primary); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { height: 4px; }
.scroll-x::-webkit-scrollbar-track { background: var(--border); border-radius: 2px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 2px; }

/* Mobile dashboard refinement */
.coin-pill {
    min-width: 78px;
    height: 34px;
    border-radius: 18px;
    background: #F4F4F5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #262B35;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.coin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 991px) {
    :root {
        --body-bg: #F6F7F9;
        --border: #ECEFF3;
        --radius: 10px;
        --radius-sm: 8px;
        --shadow-sm: 0 5px 16px rgba(15, 23, 42, 0.07);
        --shadow-md: 0 9px 24px rgba(15, 23, 42, 0.10);
    }

    body {
        background: #F6F7F9;
        font-size: 13px;
        line-height: 1.35;
    }

    .app-wrapper {
        max-width: 430px;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 15% 21%, rgba(211,47,47,0.08) 0 1px, transparent 1.4px) 0 0 / 8px 8px,
            linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 34%, #F6F7F9 100%);
        padding-bottom: 74px;
    }

    .app-wrapper::before {
        content: "";
        position: absolute;
        top: 108px;
        right: -12px;
        width: 178px;
        height: 210px;
        background: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 210' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 108 26 92 48 104 72 58 96 74 124 34 148 44 180 8' fill='none' stroke='%23EF4444' stroke-width='2' opacity='.48'/%3E%3Cpath d='M0 172 24 148 46 160 70 114 94 124 122 84 146 94 180 52' fill='none' stroke='%23EF4444' stroke-width='1.5' opacity='.24'/%3E%3C/svg%3E") center / contain no-repeat;
        pointer-events: none;
    }

    .main-content,
    .top-bar,
    .page-content {
        position: relative;
        z-index: 1;
    }

    .top-bar {
        padding: 18px 18px 15px;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
        position: static;
    }

    .top-bar .brand {
        gap: 9px;
    }

    .top-bar .brand-icon-sm {
        width: 34px;
        height: 34px;
        border-radius: 0;
        background: transparent;
        color: var(--primary);
    }

    .top-bar .brand-name {
        font-size: 25px;
        letter-spacing: -1px;
        line-height: 1;
    }

    .top-bar .user-info .welcome {
        font-size: 9px;
        color: #5E6675;
        line-height: 1.1;
    }

    .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.15;
        text-transform: capitalize;
    }

    .online-dot {
        width: 5px;
        height: 5px;
        background: var(--primary);
        vertical-align: middle;
    }

    .top-bar .avatar-btn {
        width: 36px;
        height: 36px;
        background: #fff;
        border-color: #E5E7EB;
    }

    .top-bar .avatar-btn i {
        color: #111827;
        font-size: 17px;
    }

    .page-content {
        padding: 0 20px 12px;
    }

    .balance-card,
    .profit-card,
    .perf-card,
    .action-btn,
    .ticker-card {
        border: 1px solid rgba(229, 231, 235, 0.88);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }

    .balance-card {
        min-height: 174px;
        padding: 17px 17px 13px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    .balance-card .bg-chart-wrap {
        top: 20px;
        right: -52px;
        width: 56%;
        opacity: .35;
    }

    .balance-card .total-label {
        font-size: 12px;
        gap: 5px;
    }

    .balance-card .total-amount {
        font-size: 38px;
        letter-spacing: -1.6px;
        line-height: 1;
        margin: 7px 0 6px;
        font-weight: 500;
    }

    .balance-card .total-usd {
        font-size: 13px;
        margin-bottom: 17px;
    }

    .balance-row {
        gap: 0;
        border-top: 1px solid var(--border);
        padding-top: 12px;
    }

    .balance-item {
        background: transparent;
        border-radius: 0;
        padding: 0;
    }

    .balance-item + .balance-item {
        border-left: 1px solid var(--border);
        padding-left: 34px;
    }

    .balance-item .bi-label {
        font-size: 10px;
    }

    .balance-item .bi-value {
        font-size: 12px;
        margin-top: 5px;
        font-weight: 600;
    }

    .profit-card,
    .perf-card {
        padding: 12px 15px;
        margin-bottom: 10px;
        border-radius: 10px;
    }

    .profit-card {
        min-height: 112px;
    }

    .profit-card .card-header {
        margin: -2px -5px 11px;
        padding: 0 0 8px;
        border-bottom: 1px solid var(--border);
    }

    .profit-card .card-title,
    .perf-card > .d-flex > div:first-child {
        font-size: 12px !important;
        gap: 8px;
        font-weight: 500 !important;
    }

    .profit-card .card-title i,
    .perf-card i {
        font-size: 17px;
    }

    .form-select {
        min-height: 28px;
        padding: 5px 23px 5px 10px !important;
        border-radius: 5px !important;
        border-width: 1px;
        font-size: 10px !important;
    }

    .profit-grid {
        column-gap: 22px;
    }

    .profit-item + .profit-item {
        border-left: 1px solid var(--border);
        padding-left: 22px;
    }

    .profit-item .pi-label,
    .perf-item .pf-label {
        font-size: 10px;
    }

    .profit-item .pi-value {
        font-size: 21px;
        letter-spacing: -0.5px;
        line-height: 1.15;
    }

    .profit-item .pi-pct {
        font-size: 11px;
    }

    .perf-card {
        min-height: 103px;
    }

    .perf-card > .d-flex {
        margin: -2px -5px 11px !important;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }

    .perf-grid {
        gap: 0;
        grid-template-columns: repeat(4, 1fr);
    }

    .perf-item {
        min-width: 0;
        padding-right: 10px;
    }

    .perf-item + .perf-item {
        border-left: 1px solid var(--border);
        padding-left: 12px;
    }

    .perf-item .pf-value {
        font-size: 13px;
        line-height: 1.2;
        letter-spacing: -0.2px;
    }

    .perf-item .pf-bar {
        height: 3px;
        margin-top: 7px;
    }

    .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
        margin-bottom: 10px;
    }

    .action-btn {
        min-height: 58px;
        padding: 10px 9px;
        border-radius: 9px;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        grid-template-areas:
            "icon label"
            "icon sub";
        column-gap: 8px;
        align-items: center;
        text-align: left;
    }

    .action-btn .ab-icon {
        grid-area: icon;
        width: 32px;
        height: 32px;
        margin: 0;
        border: 1.2px solid var(--primary);
        background: #fff;
        color: var(--primary);
        font-size: 17px;
    }

    .action-btn .ab-label {
        grid-area: label;
        align-self: end;
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .action-btn .ab-sub {
        grid-area: sub;
        align-self: start;
        font-size: 9px;
        line-height: 1.2;
    }

    .dashboard-chart-card,
    .market-title {
        display: none;
    }

    .ticker-scroll {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        overflow: visible;
        padding-bottom: 0;
        background: #fff;
        border: 1px solid rgba(229, 231, 235, 0.88);
        border-radius: 10px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }

    .ticker-card {
        width: auto;
        min-width: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 10px 9px;
        gap: 4px;
    }

    .ticker-card + .ticker-card {
        border-left: 1px solid var(--border);
    }

    .ticker-card:nth-child(n+4) {
        display: none;
    }

    .ticker-card-top {
        gap: 6px;
    }

    .ticker-icon {
        width: 27px;
        height: 27px;
        font-size: 13px;
    }

    .ticker-pair {
        font-size: 9px;
        color: #111827;
        white-space: nowrap;
    }

    .ticker-name {
        display: none;
    }

    .ticker-card svg {
        width: 42px !important;
        height: 22px !important;
        align-self: flex-end;
        margin-top: -12px;
    }

    .ticker-card-bot {
        display: block;
        margin-top: -15px;
        padding-left: 33px;
    }

    .t-price-big {
        font-size: 11px;
        line-height: 1.15;
    }

    .t-change {
        font-size: 9px;
        line-height: 1.2;
    }

    .bottom-nav {
        max-width: 430px;
        height: 74px;
        padding: 7px 0 calc(6px + env(safe-area-inset-bottom));
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.08);
    }

    .bottom-nav .nav-item {
        gap: 2px;
    }

    .bottom-nav .nav-item i {
        font-size: 19px;
    }

    .bottom-nav .nav-item span {
        font-size: 9px;
    }

    .bottom-nav .deposit-fab {
        width: 45px;
        height: 45px;
        margin-top: -25px;
        box-shadow: 0 7px 18px rgba(211,47,47,0.32);
    }

    .bottom-nav .deposit-fab span {
        font-size: 8px;
    }
}

@media (max-width: 991px) {
    .app-wrapper {
        max-width: 459px;
        background:
            radial-gradient(circle at 11% 18%, rgba(211,47,47,0.075) 0 1px, transparent 1.45px) 0 0 / 8px 8px,
            linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
    }

    .app-wrapper::before {
        top: 70px;
        right: -8px;
        width: 164px;
        height: 235px;
        opacity: .9;
    }

    .top-bar {
        height: 70px;
        padding: 13px 23px 9px;
    }

    .top-bar .brand-name {
        font-size: 25px;
    }

    .top-bar .brand-icon-sm {
        width: 31px;
        height: 31px;
    }

    .top-bar .avatar-btn {
        width: 37px;
        height: 37px;
    }

    .page-content {
        padding: 0 23px 8px;
    }

    .balance-card,
    .profit-card,
    .perf-card,
    .action-btn,
    .ticker-scroll,
    .bottom-nav {
        border-radius: 8px;
        box-shadow: 0 7px 18px rgba(15, 23, 42, 0.10);
    }

    .balance-card {
        height: 174px;
        min-height: 0;
        padding: 16px 15px 12px;
        margin-bottom: 10px;
    }

    .balance-card .bg-chart-wrap {
        right: -58px;
        top: 42px;
        width: 53%;
        opacity: .22;
    }

    .balance-card .total-amount {
        font-size: 40px;
        line-height: .98;
        margin: 5px 0 6px;
        font-weight: 500;
    }

    .balance-card .total-usd {
        margin-bottom: 12px;
    }

    .coin-pill {
        min-width: 80px;
        height: 32px;
    }

    .balance-row {
        padding-top: 11px;
    }

    .balance-item + .balance-item {
        padding-left: 36px;
    }

    .profit-card {
        height: 122px;
        min-height: 0;
        padding: 11px 12px 10px;
        margin-bottom: 9px;
    }

    .profit-card .card-header {
        height: 31px;
        margin: -1px 0 9px;
        padding-bottom: 8px;
    }

    .profit-grid {
        height: 58px;
    }

    .profit-item {
        padding: 0;
    }

    .profit-item + .profit-item {
        padding-left: 28px;
    }

    .profit-item .pi-label {
        margin-bottom: 4px;
    }

    .profit-item .pi-value {
        font-size: 22px;
        line-height: 1;
    }

    .profit-item .pi-pct {
        margin-top: 6px;
    }

    .perf-card {
        height: 104px;
        min-height: 0;
        padding: 10px 12px 9px;
        margin-bottom: 8px;
    }

    .perf-card > .d-flex {
        height: 30px;
        margin: 0 0 9px !important;
        padding-bottom: 8px;
    }

    .perf-item {
        padding-right: 11px;
    }

    .perf-item + .perf-item {
        padding-left: 11px;
    }

    .perf-item .pf-value {
        font-size: 13px;
    }

    .perf-item .pf-bar {
        margin-top: 6px;
    }

    .action-grid {
        gap: 8px;
        margin-bottom: 8px;
    }

    .action-btn {
        min-height: 58px;
        padding: 9px 10px;
        grid-template-columns: 33px minmax(0, 1fr);
        column-gap: 7px;
    }

    .action-btn .ab-icon {
        width: 31px;
        height: 31px;
    }

    .action-btn .ab-label {
        font-size: 11px;
    }

    .ticker-scroll {
        height: 73px;
        margin-bottom: 0;
        border-radius: 8px;
    }

    .ticker-card {
        min-height: 71px;
        padding: 9px 9px 8px;
    }

    .ticker-icon {
        width: 29px;
        height: 29px;
    }

    .ticker-pair {
        font-size: 9px;
    }

    .ticker-card svg {
        width: 43px !important;
        height: 21px !important;
        margin-top: -10px;
        margin-right: 1px;
    }

    .ticker-card-bot {
        margin-top: -12px;
        padding-left: 35px;
    }

    .bottom-nav {
        left: 50%;
        right: auto;
        width: calc(100% - 46px);
        max-width: 413px;
        height: 57px;
        bottom: 0;
        padding: 6px 0 calc(4px + env(safe-area-inset-bottom));
        border: 1px solid rgba(229, 231, 235, 0.88);
        border-bottom: 0;
        border-radius: 8px 8px 0 0;
    }

    .bottom-nav .nav-item i {
        font-size: 18px;
    }

    .bottom-nav .nav-item span {
        font-size: 8px;
    }

    .bottom-nav .deposit-fab {
        width: 45px;
        height: 45px;
        margin-top: -23px;
    }
}

@media (max-width: 991px) {
    html,
    body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
        background: #fff;
    }

    .app-wrapper {
        width: 100%;
        max-width: none;
        margin: 0;
        min-height: 100vh;
        padding-bottom: 197px;
        background:
            radial-gradient(circle at 11% 18%, rgba(211,47,47,0.075) 0 1px, transparent 1.45px) 0 0 / 8px 8px,
            linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    }

    .app-wrapper::before {
        top: 82px;
        right: -22px;
        width: 148px;
        height: 238px;
        opacity: .55;
    }

    .top-bar {
        height: 62px;
        padding: 11px 22px 7px;
    }

    .top-bar .brand {
        gap: 7px;
    }

    .top-bar .brand-icon-sm {
        width: 29px;
        height: 29px;
    }

    .top-bar .brand-name {
        font-size: 24px;
    }

    .top-bar .user-info .welcome {
        font-size: 9px;
    }

    .top-bar .user-info .username {
        font-size: 11px;
    }

    .top-bar .avatar-btn {
        width: 35px;
        height: 35px;
    }

    .page-content {
        padding: 0 16px 0;
    }

    .dashboard-stack {
        min-height: calc(100dvh - 62px - 58px);
        display: grid;
        grid-template-rows:
            minmax(159px, 1.8fr)
            minmax(111px, 1.18fr)
            minmax(95px, .98fr)
            minmax(53px, .55fr)
            minmax(66px, .78fr);
        gap: 8px;
        padding-bottom: 0;
    }

    .balance-card,
    .profit-card,
    .perf-card,
    .action-btn,
    .ticker-scroll,
    .bottom-nav {
        border-radius: 8px;
        box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09);
    }

    .balance-card {
        height: 100%;
        padding: 13px 14px 10px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .balance-card .total-label {
        font-size: 11px;
    }

    .balance-card .total-amount {
        font-size: 35px;
        margin: 3px 0 4px;
    }

    .balance-card .total-usd {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .coin-pill {
        min-width: 74px;
        height: 29px;
        font-size: 11px;
    }

    .coin-dot {
        width: 17px;
        height: 17px;
        font-size: 10px;
    }

    .balance-row {
        padding-top: 9px;
    }

    .balance-item + .balance-item {
        padding-left: 28px;
    }

    .balance-item .bi-value {
        font-size: 12px;
    }

    .profit-card {
        height: 100%;
        padding: 9px 12px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    .profit-card .card-header {
        height: 29px;
        margin: 0 0 8px;
        padding-bottom: 7px;
    }

    .profit-card .card-title,
    .perf-card > .d-flex > div:first-child {
        font-size: 12px !important;
    }

    .profit-grid {
        height: auto;
        flex: 1;
        align-items: center;
    }

    .profit-item .pi-label {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .profit-item .pi-value {
        font-size: 20px;
    }

    .profit-item .pi-pct {
        font-size: 10px;
        margin-top: 5px;
    }

    .perf-card {
        height: 100%;
        padding: 9px 12px 8px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    .perf-card > .d-flex {
        height: 28px;
        margin: 0 0 7px !important;
        padding-bottom: 7px;
    }

    .perf-item {
        padding-right: 8px;
    }

    .perf-item + .perf-item {
        padding-left: 8px;
    }

    .perf-item .pf-label {
        font-size: 9px;
        white-space: nowrap;
    }

    .perf-item .pf-value {
        font-size: 12px;
    }

    .perf-grid {
        flex: 1;
        align-items: center;
    }

    .action-grid {
        gap: 7px;
        margin-bottom: 0;
        align-items: stretch;
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 124px;
        z-index: 290;
    }

    .action-btn {
        min-height: 53px;
        padding: 8px;
        grid-template-columns: 30px minmax(0, 1fr);
        column-gap: 7px;
    }

    .action-btn .ab-icon {
        width: 29px;
        height: 29px;
        font-size: 15px;
    }

    .action-btn .ab-label {
        font-size: 11px;
    }

    .action-btn .ab-sub {
        font-size: 9px;
    }

    .ticker-scroll {
        height: 100%;
        border-radius: 8px;
        align-items: stretch;
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 58px;
        z-index: 290;
    }

    .ticker-card {
        min-height: 64px;
        padding: 8px 8px 6px;
        justify-content: center;
    }

    .ticker-icon {
        width: 27px;
        height: 27px;
    }

    .ticker-card svg {
        width: 40px !important;
        height: 19px !important;
        margin-top: -11px;
    }

    .ticker-card-bot {
        margin-top: -12px;
        padding-left: 32px;
    }

    .t-price-big {
        font-size: 10px;
    }

    .t-change {
        font-size: 8px;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: none;
        height: 58px;
        margin-top: 0;
        padding: 6px 0 5px;
        border-radius: 0;
        z-index: 300;
    }

    .bottom-nav .deposit-fab {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }
}

@media (max-width: 991px) and (min-height: 840px) {
    .balance-card .total-amount {
        font-size: 38px;
    }

    .profit-item .pi-value {
        font-size: 22px;
    }

    .perf-item .pf-value {
        font-size: 13px;
    }
}

@media (max-width: 991px) {
    .dashboard-stack {
        min-height: 0;
        display: block;
        padding-bottom: 0;
    }

    .balance-card {
        height: 159px;
        display: block;
        margin-bottom: 8px;
    }

    .profit-card {
        height: 111px;
        display: block;
        margin-bottom: 8px;
    }

    .profit-grid {
        height: 51px;
        flex: none;
        align-items: initial;
    }

    .perf-card {
        height: 95px;
        display: block;
        margin-bottom: 7px;
    }

    .perf-grid {
        flex: none;
        align-items: initial;
    }

    .ticker-scroll {
        height: 66px;
    }
}

/* Mockup-accurate mobile dashboard shell */
@media (max-width: 991px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
        background: #f2f3f5;
        font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .app-wrapper {
        width: 100%;
        max-width: 480px;
        min-height: 100vh;
        margin: 0 auto;
        padding-bottom: 86px;
        overflow: hidden;
        background:
            radial-gradient(circle at 7% 18%, rgba(211, 47, 47, .045) 0 1px, transparent 1.4px) 0 0 / 8px 8px,
            linear-gradient(180deg, #fff 0%, #fafafa 100%);
    }

    .app-wrapper::before {
        top: 96px;
        right: -34px;
        width: 180px;
        height: 250px;
        opacity: .48;
    }

    .top-bar {
        height: 86px;
        padding: 21px 24px 13px;
        background: transparent;
    }

    .top-bar .brand {
        gap: 8px;
    }

    .top-bar .brand-icon-sm {
        width: 34px;
        height: 34px;
    }

    .top-bar .brand-name {
        font-size: 28px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -1px;
    }

    .top-bar .user-info .welcome {
        font-size: 10px;
        line-height: 1.05;
        color: #6b7280;
    }

    .top-bar .user-info .username {
        font-size: 12px;
        line-height: 1.1;
        font-weight: 600;
    }

    .top-bar .avatar-btn {
        width: 39px;
        height: 39px;
        border: 1px solid #e7eaf0;
        background: #fff;
    }

    .page-content {
        padding: 0 24px 0;
    }

    .dashboard-stack {
        display: block;
        min-height: 0;
        padding: 0;
    }

    .balance-card,
    .profit-card,
    .perf-card,
    .action-btn,
    .ticker-scroll {
        border: 0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    }

    .balance-card {
        height: 174px;
        display: block;
        padding: 18px 18px 14px;
        margin-bottom: 12px;
    }

    .balance-card .bg-chart-wrap {
        top: 46px;
        right: -52px;
        width: 58%;
        height: 130px;
        opacity: .23;
    }

    .balance-card .total-label {
        font-size: 12px;
        font-weight: 500;
        color: #52627a;
    }

    .balance-card .total-amount {
        font-size: 38px;
        line-height: 1;
        font-weight: 600;
        letter-spacing: -1.4px;
        margin: 6px 0 7px;
    }

    .balance-card .total-usd {
        font-size: 13px;
        margin-bottom: 16px;
        color: #52627a;
    }

    .coin-pill {
        min-width: 84px;
        height: 34px;
        padding: 8px 14px;
        border-radius: 999px;
        background: #f4f4f5;
        font-size: 12px;
        font-weight: 600;
    }

    .balance-row {
        padding-top: 12px;
        border-top: 1px solid #eef1f5;
    }

    .balance-item + .balance-item {
        padding-left: 35px;
        border-left: 1px solid #eef1f5;
    }

    .balance-item .bi-label {
        font-size: 10px;
        color: #6b7280;
    }

    .balance-item .bi-value {
        font-size: 12px;
        font-weight: 600;
    }

    .profit-card {
        height: 130px;
        display: block;
        padding: 13px 16px 14px;
        margin-bottom: 12px;
    }

    .profit-card .card-header,
    .perf-card > .d-flex {
        height: 32px;
        margin: 0 0 12px !important;
        padding-bottom: 9px;
        border-bottom: 1px solid #eef1f5;
    }

    .profit-card .card-title,
    .perf-card > .d-flex > div:first-child {
        font-size: 13px !important;
        font-weight: 500 !important;
    }

    .profit-grid {
        height: 62px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .profit-item + .profit-item {
        padding-left: 28px;
        border-left: 1px solid #eef1f5;
    }

    .profit-item .pi-label {
        font-size: 10px;
        margin-bottom: 5px;
        color: #52627a;
    }

    .profit-item .pi-value {
        font-size: 22px;
        line-height: 1;
        font-weight: 600;
    }

    .profit-item .pi-pct {
        font-size: 10px;
        margin-top: 6px;
        font-weight: 500;
    }

    .perf-card {
        height: 104px;
        display: block;
        padding: 12px 16px 13px;
        margin-bottom: 12px;
    }

    .perf-card > .d-flex {
        margin-bottom: 10px !important;
    }

    .perf-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
    }

    .perf-item {
        padding-right: 11px;
    }

    .perf-item + .perf-item {
        padding-left: 11px;
        border-left: 1px solid #eef1f5;
    }

    .perf-item .pf-label {
        font-size: 9px;
        color: #52627a;
    }

    .perf-item .pf-value {
        font-size: 12px;
        font-weight: 600;
    }

    .perf-item .pf-bar {
        height: 2px;
        margin-top: 7px;
    }

    .action-grid {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 12px;
    }

    .action-btn {
        height: 61px;
        min-height: 61px;
        padding: 10px 10px;
        border-radius: 10px;
        grid-template-columns: 33px minmax(0, 1fr);
    }

    .action-btn .ab-icon {
        width: 32px;
        height: 32px;
        color: var(--primary);
        border-color: var(--primary);
        background: #fff;
        font-size: 16px;
    }

    .action-btn .ab-label {
        font-size: 11px;
        font-weight: 600;
    }

    .action-btn .ab-sub {
        font-size: 9px;
        color: #6b7280;
    }

    .ticker-scroll {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        height: 64px;
        overflow: hidden;
        border-radius: 10px;
    }

    .ticker-card {
        min-height: 64px;
        padding: 8px 9px 7px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ticker-card + .ticker-card {
        border-left: 1px solid #eef1f5;
    }

    .ticker-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .ticker-pair {
        font-size: 8px;
        font-weight: 700;
    }

    .ticker-card svg {
        width: 43px !important;
        height: 20px !important;
        margin-top: -12px;
    }

    .ticker-card-bot {
        margin-top: -13px;
        padding-left: 33px;
    }

    .t-price-big {
        font-size: 10px;
        font-weight: 600;
    }

    .t-change {
        font-size: 8px;
    }

    .bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 100%;
        max-width: 480px;
        height: 64px;
        padding: 7px 0 5px;
        border: 0;
        border-top: 1px solid #eef1f5;
        border-radius: 14px 14px 0 0;
        background: #fff;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .06);
    }

    .bottom-nav .nav-item i {
        font-size: 18px;
    }

    .bottom-nav .nav-item span {
        font-size: 8px;
        font-weight: 500;
    }

    .bottom-nav .deposit-fab {
        width: 56px;
        height: 56px;
        margin-top: -29px;
        box-shadow: 0 12px 24px rgba(211, 47, 47, .25);
    }
}

/* Final mockup polish pass */
@media (max-width: 991px) {
    body {
        font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
        font-weight: 400;
    }

    .app-wrapper {
        padding-bottom: 94px;
        background:
            radial-gradient(circle at 7% 18%, rgba(211, 47, 47, .03) 0 1px, transparent 1.4px) 0 0 / 8px 8px,
            radial-gradient(circle at 94% 11%, rgba(226, 46, 46, .12), transparent 26%),
            linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    }

    .app-wrapper::before {
        opacity: .34;
    }

    .top-bar {
        height: 82px;
        padding: 20px 24px 12px;
    }

    .top-bar .d-flex.align-items-center {
        gap: 8px !important;
    }

    .top-bar .user-info {
        line-height: 1.1;
    }

    .top-bar .user-info .welcome {
        font-size: 10px;
        line-height: 1.1;
    }

    .top-bar .user-info .username {
        font-size: 12px;
        line-height: 1.1;
        font-weight: 600;
    }

    .online-dot {
        width: 6px;
        height: 6px;
        margin-left: 4px;
    }

    .balance-card,
    .profit-card,
    .perf-card,
    .action-btn,
    .ticker-scroll,
    .card,
    .summary-card {
        border: none;
        border-radius: 22px;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, .05),
            0 2px 8px rgba(0, 0, 0, .03);
    }

    .balance-card {
        height: 184px;
        padding: 20px;
        margin-bottom: 12px;
    }

    .balance-card .bg-chart-wrap {
        opacity: .18;
        right: -58px;
        top: 50px;
        height: 132px;
    }

    .balance-card .total-label {
        font-size: 13px;
        line-height: 1.1;
    }

    .balance-card .total-amount {
        font-size: 56px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: -2px;
        margin: 5px 0 4px;
    }

    .balance-card .total-usd {
        margin-bottom: 13px;
    }

    .coin-pill {
        min-width: auto;
        height: 34px;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 14px;
        gap: 7px;
    }

    .profit-card {
        height: 128px;
        padding: 14px 16px;
        margin-bottom: 12px;
    }

    .profit-card .card-header,
    .perf-card > .d-flex {
        height: 38px;
        margin-bottom: 10px !important;
        padding-bottom: 10px;
    }

    .profit-card .form-select,
    .perf-card .form-select {
        height: 38px;
        min-height: 38px;
        border-radius: 12px !important;
        padding: 0 30px 0 14px !important;
        font-size: 12px !important;
        border-color: #eef1f5;
    }

    .profit-item .pi-label {
        font-size: 11px;
    }

    .profit-item .pi-value {
        font-size: 23px;
        font-weight: 600;
    }

    .profit-item .pi-pct {
        font-size: 11px;
    }

    .perf-card {
        height: 108px;
        padding: 14px 16px;
        margin-bottom: 12px;
    }

    .perf-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .perf-item,
    .perf-item + .perf-item {
        padding-left: 0;
        padding-right: 0;
    }

    .perf-item .pf-bar {
        height: 2px;
        border-radius: 99px;
        margin-top: 8px;
    }

    .perf-item .pf-bar-fill {
        border-radius: 99px;
    }

    .action-grid {
        gap: 10px;
        margin-bottom: 12px;
    }

    .action-btn {
        height: 84px;
        min-height: 84px;
        border-radius: 16px;
        padding: 14px 12px;
        grid-template-columns: 40px minmax(0, 1fr);
        column-gap: 10px;
    }

    .action-btn .ab-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-width: 1.2px;
    }

    .action-btn .ab-label {
        font-size: 12px;
        font-weight: 600;
    }

    .action-btn .ab-sub {
        font-size: 10px;
    }

    .ticker-scroll {
        height: 68px;
        border-radius: 16px;
    }

    .ticker-card {
        min-height: 68px;
        padding: 12px;
    }

    .ticker-icon {
        width: 26px;
        height: 26px;
    }

    .ticker-card svg {
        width: 52px !important;
        height: 24px !important;
        margin-top: -13px;
    }

    .ticker-card-bot {
        padding-left: 31px;
    }

    .bottom-nav {
        height: 72px;
        padding: 9px 0 7px;
        border-radius: 18px 18px 0 0;
    }

    .bottom-nav .deposit-fab {
        width: 64px;
        height: 64px;
        margin-top: -34px;
        position: relative;
        top: -12px;
        box-shadow: 0 10px 25px rgba(226, 46, 46, .30);
    }

    .bottom-nav .deposit-fab i {
        font-size: 24px;
    }

    .page-header {
        padding: 14px 0 14px;
        justify-content: center;
        text-align: center;
    }

    .page-header .ph-title {
        font-size: 34px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -1px;
    }

    .page-header .ph-subtitle {
        font-size: 16px;
        margin-top: 10px;
    }

    .scroll-x.mb-3 {
        margin-bottom: 16px !important;
    }

    .amount-chip {
        min-width: 60px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 18px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 700;
        border-color: #eef1f5;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    }

    .amount-chip.active {
        border-color: var(--primary);
        background: #fff;
    }

    .chart-header-card {
        border: none;
        border-radius: 22px;
        padding: 22px 24px;
        margin-bottom: 18px;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, .05),
            0 2px 8px rgba(0, 0, 0, .03);
    }

    .chart-coin-info {
        gap: 18px;
    }

    .chart-coin-icon {
        width: 58px !important;
        height: 58px !important;
        font-size: 26px !important;
        box-shadow: 0 10px 20px rgba(247, 147, 26, .25);
    }

    .chart-header-card .form-select {
        border-radius: 12px !important;
        min-height: 36px;
        font-size: 16px !important;
        border-color: #eef1f5;
    }

    .chart-price {
        font-size: 34px;
        line-height: 1;
        font-weight: 700;
    }

    .chart-approx {
        font-size: 14px;
        margin-top: 8px;
    }

    .chart-change {
        font-size: 18px;
        font-weight: 700;
    }

    .timerange-tabs {
        height: 50px;
        border-radius: 14px;
        padding: 5px;
        background: #f4f5f7;
    }

    .tr-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 11px;
        font-size: 16px;
        font-weight: 500;
    }

    .chart-type-btn {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        background: #fff;
    }

    .chart-type-btn.active {
        background: #fff;
        border-color: var(--primary);
        color: var(--primary);
        box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
    }

    .crypto-chart-surface {
        width: 100%;
        height: 360px;
        min-height: 360px;
    }

    #cryptoChart {
        overflow: hidden;
        border-radius: 18px;
    }

    .card:has(#cryptoChart) {
        border: none;
        border-radius: 22px;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, .05),
            0 2px 8px rgba(0, 0, 0, .03);
    }

    .card:has(#cryptoChart) .card-body {
        padding: 12px !important;
    }
}

/* Dashboard width micro-adjustment: only outer shell/gutters */
@media (max-width: 991px) {
    .app-wrapper {
        max-width: 540px;
    }

    .page-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Market Chart final mobile viewport fit */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page) {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background: #fff;
        font-family: Inter, Poppins, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .app-wrapper:has(.market-chart-page) {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding-bottom: 86px;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 5% 18%, rgba(239, 35, 60, .10), transparent 24%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 122 58 102 78 118 108 72 134 86 164 34 196 50 220 16' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.18'/%3E%3Cpath d='M0 144 40 132 68 150 104 110 130 124 160 82 194 96 220 70' fill='none' stroke='%23EF233C' stroke-width='1.5' opacity='.10'/%3E%3C/svg%3E") right 78px / 150px 125px no-repeat,
            radial-gradient(circle at 12% 18%, rgba(239, 35, 60, .025) 0 1px, transparent 1.3px) 0 0 / 7px 7px,
            linear-gradient(180deg, #fff 0%, #fbfbfb 100%);
    }

    .app-wrapper:has(.market-chart-page)::before {
        display: none;
    }

    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
    }

    .app-wrapper:has(.market-chart-page) .page-content {
        width: 100%;
        padding: 0 20px 86px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 58px;
        padding: 10px 20px 6px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand {
        gap: 7px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 27px;
        height: 27px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 23px;
        line-height: 1;
        letter-spacing: -.75px;
        font-weight: 700;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .d-flex.align-items-center {
        gap: 7px !important;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info {
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 8px;
        line-height: 1.05;
        color: #8A94A6;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 10px;
        line-height: 1.05;
        font-weight: 600;
        color: #07152F;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 38px;
        height: 38px;
        border: 1px solid #EEF1F5;
        background: #fff;
        box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
    }

    .market-chart-page {
        color: #07152F;
        padding-bottom: 0;
    }

    .market-chart-page .page-header {
        padding: 10px 0 10px;
        text-align: center;
        justify-content: center;
    }

    .market-chart-page .page-header .ph-title {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.65px;
    }

    .market-chart-page .page-header .ph-subtitle {
        font-size: 13px;
        line-height: 1.25;
        margin-top: 7px;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        border: 0;
        border-radius: 18px;
        background: #fff;
        box-shadow:
            0 8px 22px rgba(0, 0, 0, .05),
            0 2px 7px rgba(0, 0, 0, .03);
    }

    .market-chart-page .chart-header-card {
        min-height: 76px;
        padding: 12px 14px;
        margin-bottom: 10px;
    }

    .market-chart-page .chart-coin-info {
        gap: 10px;
        align-items: center;
        min-width: 0;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        flex: 0 0 52px;
        font-size: 25px !important;
    }

    .market-chart-page .chart-header-card .flex-grow-1 {
        flex: 0 1 122px !important;
        min-width: 0;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 100px !important;
        min-height: 28px;
        height: 28px;
        padding: 0 21px 0 9px !important;
        border-radius: 9px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        border-color: #EEF1F5;
    }

    .market-chart-page .chart-header-card span {
        display: block;
        font-size: 10px !important;
        color: #8A94A6 !important;
        margin-top: 4px;
    }

    .market-chart-page .chart-header-card .text-end {
        flex: 1 1 auto;
        min-width: 95px;
    }

    .market-chart-page .chart-price {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.8px;
        white-space: nowrap;
        color: #07152F;
    }

    .market-chart-page .chart-approx {
        font-size: 11px;
        line-height: 1.1;
        margin-top: 6px;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card .ms-3 {
        margin-left: 8px !important;
        flex: 0 0 62px;
    }

    .market-chart-page .chart-change {
        display: block;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 700;
        color: #EF233C !important;
        text-align: left;
    }

    .market-chart-page .chart-change + div {
        font-size: 9px !important;
        line-height: 1.1;
        margin-top: 5px;
        color: #8A94A6 !important;
    }

    .market-chart-page .chart-panel-card {
        margin-bottom: 9px !important;
        border-radius: 18px;
    }

    .market-chart-page .chart-panel-card .card-body {
        padding: 10px !important;
    }

    .market-chart-page .chart-toolbar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 32px;
        padding: 3px;
        border-radius: 10px;
        background: #F5F6F8;
    }

    .market-chart-page .tr-tab {
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 500;
        color: #5C667A;
        padding: 0;
    }

    .market-chart-page .tr-tab.active {
        color: #EF233C;
        background: rgba(239, 35, 60, .10);
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        gap: 5px;
        flex: 0 0 auto;
    }

    .market-chart-page .chart-type-btn {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: 1px solid #E8ECF2;
        background: #fff;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        border-color: #EF233C;
        color: #EF233C;
        box-shadow: 0 5px 12px rgba(15, 23, 42, .07);
    }

    .market-chart-page .crypto-chart-surface {
        width: 100%;
        height: 282px;
        min-height: 282px;
        border-radius: 14px;
        overflow: hidden;
    }

    .market-chart-page #cryptoChart svg {
        display: block;
    }

    .market-chart-page .chart-stats-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        padding: 12px 0;
        margin: 0 0 9px;
        border-radius: 16px;
    }

    .market-chart-page .chart-stat-col {
        display: grid;
        gap: 10px;
        padding: 0 12px;
        min-width: 0;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F5;
    }

    .market-chart-page .cs-label {
        font-size: 9px;
        line-height: 1.1;
        color: #8A94A6;
        margin-bottom: 4px;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        font-size: 12px;
        line-height: 1.1;
        font-weight: 500;
        color: #07152F;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        padding: 11px 14px;
        margin-bottom: 0 !important;
        border-radius: 16px;
    }

    .market-chart-page .bs-header {
        margin-bottom: 7px;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        color: #EF233C;
        font-size: 11px;
        line-height: 1.1;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 32px 1fr;
        align-items: center;
        gap: 11px;
    }

    .market-chart-page .bs-track {
        height: 7px;
        border-radius: 99px;
        background: rgba(239, 35, 60, .18);
        overflow: hidden;
    }

    .market-chart-page .bs-track-fill {
        height: 100%;
        background: #EF233C;
        border-radius: 99px;
    }

    .market-chart-page .sell-fill {
        background: rgba(239, 35, 60, .38);
    }

    .market-chart-page .sentiment-ring {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 57%, #E5E7EB 57% 100%);
        position: relative;
    }

    .market-chart-page .sentiment-ring::after {
        content: "";
        position: absolute;
        inset: 8px;
        border-radius: 50%;
        background: #fff;
    }

    .bottom-nav.chart-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 12px;
        width: auto;
        max-width: none;
        height: 64px;
        transform: none;
        padding: 7px 0 6px;
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow:
            0 10px 28px rgba(0, 0, 0, .08),
            0 2px 8px rgba(0, 0, 0, .04);
    }

    .bottom-nav.chart-nav .nav-item {
        gap: 3px;
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 18px;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 9px;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .deposit-btn-wrap {
        flex: 1;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 44px;
        height: 44px;
        margin-top: 0;
        top: auto;
        background: transparent;
        color: #6B7280;
        box-shadow: none;
        gap: 1px;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        font-size: 25px;
        color: #6B7280;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        color: #6B7280;
        font-size: 9px;
        font-weight: 500;
    }
}

/* Terminal Market Chart mobile overrides - must stay last */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background: #fff;
    }

    body:has(.market-chart-page) * {
        box-sizing: border-box;
    }

    .app-wrapper:has(.market-chart-page) {
        position: relative;
        background:
            radial-gradient(circle at 9% 19%, rgba(239, 35, 60, .14), transparent 22%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 130 42 112 70 126 105 82 132 96 165 38 192 52 220 15' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.20'/%3E%3Cpath d='M28 150 62 136 90 148 122 108 150 120 182 76 214 92' fill='none' stroke='%23EF233C' stroke-width='1.5' opacity='.13'/%3E%3C/svg%3E") right 86px / 165px 135px no-repeat,
            radial-gradient(circle at 14% 18%, rgba(239, 35, 60, .045) 0 1px, transparent 1.2px) 0 0 / 8px 8px,
            #fff;
        overflow: hidden;
    }

    .app-wrapper:has(.market-chart-page)::before {
        display: none;
    }

    .app-wrapper:has(.market-chart-page) .page-content {
        width: 100%;
        max-width: 430px;
        min-height: 100vh;
        margin: 0 auto;
        padding: 0 20px 96px;
        overflow-x: hidden;
        background: transparent;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 46px;
        margin: 22px 0 18px;
        padding: 0;
        background: transparent;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand {
        gap: 8px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 24px;
        height: 24px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 24px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.55px;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .d-flex.align-items-center {
        gap: 10px !important;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info {
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 9px;
        line-height: 1.05;
        color: #8A94A6;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.05;
        font-weight: 700;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .online-dot {
        width: 5px;
        height: 5px;
        margin-left: 3px;
        background: #EF233C;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid #EEF1F6;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
    }

    .market-chart-page {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        color: #06142E;
        font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .market-chart-page .page-header {
        justify-content: center;
        text-align: center;
        padding: 10px 0 16px;
        margin: 0;
    }

    .market-chart-page .page-header .ph-title {
        font-size: 25px;
        line-height: 1.15;
        font-weight: 700;
        letter-spacing: -.45px;
        color: #06142E;
    }

    .market-chart-page .page-header .ph-subtitle {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.3;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border: 0;
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    }

    .market-chart-page .chart-header-card {
        height: 76px;
        padding: 10px 14px;
        margin-bottom: 14px;
        border-radius: 18px;
        display: flex;
        align-items: center;
    }

    .market-chart-page .chart-coin-info {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 58px 118px minmax(0, 1fr) 62px;
        align-items: center;
        column-gap: 10px;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        font-size: 26px !important;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 108px !important;
        height: 32px;
        min-height: 32px;
        padding: 0 22px 0 12px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    .market-chart-page .chart-header-card span {
        display: block;
        margin-top: 5px;
        font-size: 10px !important;
        line-height: 1;
        color: #8A94A6 !important;
    }

    .market-chart-page .chart-header-card .ms-3 {
        margin-left: 0 !important;
        text-align: right;
    }

    .market-chart-page .chart-price {
        font-size: 24px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: -.5px;
        white-space: nowrap;
    }

    .market-chart-page .chart-approx {
        margin-top: 4px;
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .market-chart-page .chart-change {
        font-size: 12px;
        line-height: 1.15;
        font-weight: 700;
        color: #EF233C !important;
        white-space: nowrap;
    }

    .market-chart-page .chart-change + div {
        margin-top: 4px;
        font-size: 9px !important;
        line-height: 1.1;
    }

    .market-chart-page .chart-panel-card {
        height: 310px;
        border-radius: 20px;
        padding: 14px;
        margin-bottom: 10px !important;
        overflow: hidden;
    }

    .market-chart-page .chart-panel-card .card-body {
        height: 100%;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .market-chart-page .chart-toolbar {
        height: 38px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 8px;
        flex: 0 0 38px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 36px;
        padding: 3px;
        border-radius: 11px;
        background: #F6F7FA;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }

    .market-chart-page .tr-tab {
        height: 30px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        color: #34425F;
    }

    .market-chart-page .tr-tab.active {
        background: #FFE3E8;
        color: #EF233C;
        font-weight: 600;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        gap: 8px;
    }

    .market-chart-page .chart-type-btn {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        border: 1px solid #EEF1F6;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        border-color: #EF233C;
        color: #EF233C;
        box-shadow: none;
    }

    .market-chart-page .crypto-chart-surface {
        height: 236px;
        min-height: 236px;
        max-height: 236px;
        flex: 0 0 236px;
        width: 100%;
        overflow: hidden;
        border-radius: 14px;
    }

    .market-chart-page #cryptoChart,
    .market-chart-page #cryptoChart svg,
    .market-chart-page #cryptoChart canvas,
    .market-chart-page #cryptoChart .apexcharts-canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        overflow: hidden;
    }

    .market-chart-page .chart-stats-row {
        height: 82px;
        border-radius: 16px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 10px 12px;
        margin: 0 0 8px;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .chart-stat-col {
        display: grid;
        align-content: start;
        gap: 0;
        padding: 0 10px;
        min-width: 0;
    }

    .market-chart-page .chart-stat-col:first-child {
        padding-left: 0;
    }

    .market-chart-page .chart-stat-col:last-child {
        padding-right: 0;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F6;
    }

    .market-chart-page .cs-label {
        margin: 0;
        font-size: 9px;
        line-height: 1.1;
        color: #8A94A6;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        margin: 3px 0 8px;
        font-size: 11px;
        line-height: 1.15;
        font-weight: 700;
        color: #06142E;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        height: 62px;
        border-radius: 16px;
        padding: 10px 14px;
        margin: 0 0 14px !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .bs-header {
        margin: 0 0 9px;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        font-size: 11px;
        line-height: 1;
        color: #EF233C;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 38px 1fr;
        align-items: center;
        gap: 8px;
    }

    .market-chart-page .bs-track {
        height: 8px;
        border-radius: 999px;
        background: #FFD3DA;
        overflow: hidden;
    }

    .market-chart-page .bs-track-fill {
        height: 100%;
        border-radius: 999px;
        background: #EF233C;
    }

    .market-chart-page .sell-fill {
        background: #F58B9A;
    }

    .market-chart-page .sentiment-ring {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 56.71%, #FFD3DA 56.71% 100%);
    }

    .market-chart-page .sentiment-ring::after {
        inset: 9px;
    }

    .bottom-nav.chart-nav {
        position: fixed;
        left: max(20px, calc((100vw - 430px) / 2 + 20px));
        right: max(20px, calc((100vw - 430px) / 2 + 20px));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: 66px;
        border-radius: 16px;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        box-shadow: 0 -8px 28px rgba(15, 23, 42, .12);
    }

    .bottom-nav.chart-nav .nav-item {
        color: #91A0B8;
        gap: 4px;
        font-size: 10px;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .nav-item.active {
        color: #EF233C;
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 20px;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 10px;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 44px;
        height: 44px;
        margin: 0;
        top: auto;
        background: transparent;
        box-shadow: none;
        color: #6B7280;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        font-size: 28px;
        color: #6B7280;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        font-size: 10px;
        color: #91A0B8;
    }
}

@media (max-width: 390px) {
    .app-wrapper:has(.market-chart-page) .page-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .market-chart-page .chart-coin-info {
        grid-template-columns: 54px 104px minmax(0, 1fr) 56px;
        column-gap: 8px;
    }

    .market-chart-page .chart-header-card {
        padding: 10px 12px;
    }

    .market-chart-page .chart-price {
        font-size: 22px;
    }

    .market-chart-page .chart-panel-card {
        height: 300px;
    }

    .market-chart-page .crypto-chart-surface {
        height: 226px;
        min-height: 226px;
        max-height: 226px;
        flex-basis: 226px;
    }

    .bottom-nav.chart-nav {
        left: 16px;
        right: 16px;
    }
}

@media (max-width: 380px) {
    .app-wrapper:has(.market-chart-page) .page-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .market-chart-page .chart-price {
        font-size: 23px;
    }

    .market-chart-page .crypto-chart-surface {
        height: 268px;
        min-height: 268px;
    }
}

/* Market Chart production mobile fit: 390x844 / 430x932 */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page) {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background: #fff;
    }

    body:has(.market-chart-page) {
        color: #06142E;
        font-family: Inter, Poppins, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .app-wrapper:has(.market-chart-page) {
        width: 100vw;
        max-width: 100vw;
        min-width: 100vw;
        min-height: 100vh;
        margin: 0;
        padding-bottom: 92px;
        position: relative;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 10% 14%, rgba(239, 35, 60, .075), transparent 26%),
            radial-gradient(circle at 52% 10%, rgba(239, 35, 60, .045), transparent 22%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 120 54 104 78 116 106 76 132 88 162 42 190 54 220 18' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.13'/%3E%3Cpath d='M0 145 38 132 68 150 100 114 132 126 160 86 194 100 220 72' fill='none' stroke='%23EF233C' stroke-width='1.4' opacity='.08'/%3E%3C/svg%3E") right 68px / 138px 116px no-repeat,
            radial-gradient(circle at 10% 18%, rgba(239, 35, 60, .018) 0 1px, transparent 1.2px) 0 0 / 7px 7px,
            #fff;
    }

    .app-wrapper:has(.market-chart-page)::before {
        display: none;
    }

    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
        margin: 0;
    }

    .app-wrapper:has(.market-chart-page) .page-content {
        width: 100%;
        margin: 0;
        padding: 0 20px 92px;
        overflow: visible;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 50px;
        padding: 8px 20px 4px;
        align-items: center;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand {
        gap: 7px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 24px;
        height: 24px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.8px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .d-flex.align-items-center {
        gap: 7px !important;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info {
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 9px;
        line-height: 1.05;
        color: #8A94A6;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.05;
        font-weight: 700;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .online-dot {
        width: 5px;
        height: 5px;
        margin-left: 3px;
        background: #EF233C;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 42px;
        height: 42px;
        border: 1px solid #EEF1F6;
        background: #fff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

    .market-chart-page {
        width: 100%;
        color: #06142E;
        padding-bottom: 0;
    }

    .market-chart-page .page-header {
        height: auto;
        padding: 12px 0 14px;
        text-align: center;
        justify-content: center;
    }

    .market-chart-page .page-header .ph-title {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.6px;
        color: #06142E;
    }

    .market-chart-page .page-header .ph-subtitle {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.2;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border: 0;
        background: #fff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    }

    .market-chart-page .chart-header-card {
        min-height: 74px;
        height: 76px;
        padding: 11px 14px;
        margin-bottom: 12px;
        border-radius: 19px;
    }

    .market-chart-page .chart-coin-info {
        height: 100%;
        gap: 9px;
        align-items: center;
        min-width: 0;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        flex: 0 0 52px;
        font-size: 25px !important;
        border-radius: 50%;
    }

    .market-chart-page .chart-header-card .flex-grow-1 {
        flex: 0 0 106px !important;
        min-width: 0;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 104px !important;
        height: 32px;
        min-height: 32px;
        padding: 0 22px 0 10px !important;
        border-radius: 11px !important;
        border: 1px solid #EEF1F6;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #06142E;
    }

    .market-chart-page .chart-header-card span {
        display: block;
        margin-top: 4px;
        font-size: 10px !important;
        line-height: 1;
        color: #8A94A6 !important;
    }

    .market-chart-page .chart-header-card .text-end {
        flex: 1 1 auto;
        min-width: 92px;
    }

    .market-chart-page .chart-price {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -.8px;
        white-space: nowrap;
        color: #06142E;
    }

    .market-chart-page .chart-approx {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card .ms-3 {
        flex: 0 0 58px;
        margin-left: 8px !important;
    }

    .market-chart-page .chart-change {
        display: block;
        color: #EF233C !important;
        font-size: 13px;
        line-height: 1.05;
        font-weight: 700;
        text-align: left;
        white-space: nowrap;
    }

    .market-chart-page .chart-change + div {
        margin-top: 5px;
        color: #8A94A6 !important;
        font-size: 10px !important;
        line-height: 1.1;
    }

    .market-chart-page .chart-panel-card {
        height: 318px;
        margin: 0 0 10px !important;
        border-radius: 20px;
        overflow: hidden;
    }

    .market-chart-page .chart-panel-card .card-body {
        height: 100%;
        padding: 12px !important;
    }

    .market-chart-page .chart-toolbar {
        height: 36px;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 36px;
        padding: 3px;
        border-radius: 11px;
        background: #F5F6F8;
    }

    .market-chart-page .tr-tab {
        height: 30px;
        padding: 0;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #5C667A;
        font-size: 12px;
        font-weight: 500;
    }

    .market-chart-page .tr-tab.active {
        color: #EF233C;
        background: #FFE8EC;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        flex: 0 0 auto;
        gap: 5px;
    }

    .market-chart-page .chart-type-btn {
        width: 36px;
        height: 36px;
        border: 1px solid #EEF1F6;
        border-radius: 10px;
        background: #fff;
        color: #667085;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        color: #EF233C;
        border-color: #EF233C;
        box-shadow: 0 5px 12px rgba(15, 23, 42, .07);
    }

    .market-chart-page .crypto-chart-surface {
        width: 100%;
        height: 248px;
        min-height: 248px;
        max-height: 248px;
        overflow: hidden;
        border-radius: 13px;
    }

    .market-chart-page #cryptoChart svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .market-chart-page .chart-stats-row {
        height: 82px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        padding: 12px 0;
        margin: 0 0 10px;
        border-radius: 16px;
    }

    .market-chart-page .chart-stat-col {
        min-width: 0;
        display: grid;
        gap: 9px;
        padding: 0 11px;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F6;
    }

    .market-chart-page .cs-label {
        margin: 0 0 3px;
        color: #8A94A6;
        font-size: 9px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        color: #06142E;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 500;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        height: 62px;
        padding: 11px 14px;
        margin: 0 !important;
        border-radius: 16px;
    }

    .market-chart-page .bs-header {
        margin-bottom: 7px;
        display: flex;
        justify-content: space-between;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        color: #EF233C;
        font-size: 11px;
        line-height: 1.05;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 32px 1fr;
        align-items: center;
        gap: 11px;
    }

    .market-chart-page .bs-track {
        height: 7px;
        overflow: hidden;
        border-radius: 99px;
        background: rgba(239, 35, 60, .18);
    }

    .market-chart-page .bs-track-fill {
        height: 100%;
        border-radius: 99px;
        background: #EF233C;
    }

    .market-chart-page .sell-fill {
        background: rgba(239, 35, 60, .38);
    }

    .market-chart-page .sentiment-ring {
        width: 32px;
        height: 32px;
        position: relative;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 57%, #E5E7EB 57% 100%);
    }

    .market-chart-page .sentiment-ring::after {
        content: "";
        position: absolute;
        inset: 8px;
        border-radius: 50%;
        background: #fff;
    }

    .bottom-nav.chart-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: 66px;
        padding: 7px 0 6px;
        transform: none;
        border: 0;
        border-radius: 17px;
        background: #fff;
        z-index: 500;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .04);
    }

    .bottom-nav.chart-nav .nav-item {
        gap: 3px;
        color: #8A94A6;
    }

    .bottom-nav.chart-nav .nav-item.active {
        color: #EF233C;
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 20px;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 10px;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 46px;
        height: 46px;
        margin-top: 0;
        top: auto;
        background: transparent;
        color: #5C667A;
        box-shadow: none;
        gap: 1px;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        color: #5C667A;
        font-size: 25px;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        color: #5C667A;
        font-size: 10px;
        font-weight: 500;
    }
}

@media (max-width: 390px) {
    .app-wrapper:has(.market-chart-page) .page-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .market-chart-page .chart-header-card .flex-grow-1 {
        flex-basis: 100px !important;
    }

    .market-chart-page .chart-price {
        font-size: 24px;
    }

    .market-chart-page .chart-header-card .ms-3 {
        flex-basis: 54px;
    }

    .market-chart-page .chart-panel-card {
        height: 308px;
    }

    .market-chart-page .crypto-chart-surface {
        height: 238px;
        min-height: 238px;
        max-height: 238px;
    }
}

/* Market Chart exact mobile pass */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: hidden;
        box-sizing: border-box;
        background: #fff;
    }

    body:has(.market-chart-page) * {
        box-sizing: border-box;
    }

    .app-wrapper:has(.market-chart-page) {
        width: 100vw;
        max-width: 100vw;
        padding-bottom: 0;
        position: relative;
        background:
            radial-gradient(circle at 12% 13%, rgba(239, 35, 60, .12), transparent 27%),
            radial-gradient(circle at 50% 9%, rgba(239, 35, 60, .05), transparent 20%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 120 54 104 78 116 106 76 132 88 162 42 190 54 220 18' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.15'/%3E%3Cpath d='M0 145 38 132 68 150 100 114 132 126 160 86 194 100 220 72' fill='none' stroke='%23EF233C' stroke-width='1.4' opacity='.08'/%3E%3C/svg%3E") right 74px / 132px 110px no-repeat,
            radial-gradient(circle at 10% 18%, rgba(239, 35, 60, .015) 0 1px, transparent 1.2px) 0 0 / 7px 7px,
            #fff;
    }

    .app-wrapper:has(.market-chart-page) .page-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 20px 96px;
        overflow-x: hidden;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 46px;
        padding: 22px 20px 0;
        margin: 0 0 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 24px;
        height: 24px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 24px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: -.75px;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .d-flex.align-items-center {
        gap: 10px !important;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info {
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 9px;
        line-height: 1.05;
        color: #8A94A6;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.05;
        font-weight: 700;
        color: #06142E;
    }

    .app-wrapper:has(.market-chart-page) .online-dot {
        width: 5px;
        height: 5px;
        margin-left: 3px;
        background: #EF233C;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid #EEF1F6;
        background: #fff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

    .market-chart-page {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        color: #06142E;
        font-family: Inter, Poppins, "SF Pro Display", "Segoe UI", sans-serif;
    }

    .market-chart-page .page-header {
        padding: 10px 0 16px;
        margin: 0;
        text-align: center;
        justify-content: center;
    }

    .market-chart-page .page-header .ph-title {
        margin: 0;
        font-size: 25px;
        line-height: 1.15;
        font-weight: 700;
        letter-spacing: -.6px;
        color: #06142E;
    }

    .market-chart-page .page-header .ph-subtitle {
        margin: 6px 0 0;
        font-size: 13px;
        line-height: 1.3;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        background: #fff;
        border: 0;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
        overflow: hidden;
    }

    .market-chart-page .chart-header-card {
        height: 76px;
        min-height: 76px;
        padding: 10px 14px;
        margin-bottom: 14px;
        border-radius: 18px;
    }

    .market-chart-page .chart-coin-info {
        height: 100%;
        display: grid;
        grid-template-columns: 58px 118px minmax(0, 1fr) 62px;
        align-items: center;
        column-gap: 10px;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        border-radius: 50%;
        font-size: 26px !important;
        font-weight: 700 !important;
    }

    .market-chart-page .chart-header-card .flex-grow-1 {
        min-width: 0;
        width: 100%;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 108px !important;
        height: 32px;
        min-height: 32px;
        border: 1px solid #EEF1F6;
        border-radius: 10px !important;
        padding: 0 22px 0 12px !important;
        color: #06142E;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    .market-chart-page .chart-header-card span {
        margin-top: 4px;
        color: #8A94A6 !important;
        font-size: 10px !important;
        line-height: 1.1;
    }

    .market-chart-page .chart-header-card .text-end {
        min-width: 0;
        text-align: right !important;
        line-height: 1.1;
    }

    .market-chart-page .chart-price {
        font-size: 24px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: -.5px;
        color: #06142E;
        white-space: nowrap;
    }

    .market-chart-page .chart-approx {
        margin-top: 4px;
        color: #8A94A6;
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .market-chart-page .chart-header-card .ms-3 {
        margin-left: 0 !important;
        text-align: right;
        line-height: 1.15;
    }

    .market-chart-page .chart-change {
        display: block;
        color: #EF233C !important;
        font-size: 12px;
        line-height: 1.15;
        font-weight: 700;
        white-space: nowrap;
    }

    .market-chart-page .chart-change + div {
        margin-top: 4px;
        color: #8A94A6 !important;
        font-size: 9px !important;
        line-height: 1.1;
    }

    .market-chart-page .chart-panel-card {
        height: 310px;
        border-radius: 20px;
        padding: 0;
        margin-bottom: 10px !important;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    }

    .market-chart-page .chart-panel-card .card-body {
        height: 100%;
        padding: 14px !important;
        overflow: hidden;
    }

    .market-chart-page .chart-toolbar {
        height: 38px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 36px;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        padding: 3px;
        border-radius: 11px;
        background: #F6F7FA;
    }

    .market-chart-page .tr-tab {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        padding: 0;
        color: #34425F;
        font-size: 12px;
        font-weight: 500;
    }

    .market-chart-page .tr-tab.active {
        color: #EF233C;
        background: #FFE3E8;
        font-weight: 600;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    .market-chart-page .chart-type-btn {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        border: 1px solid #EEF1F6;
        background: #fff;
        color: #667085;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        color: #EF233C;
        border-color: #EF233C;
        box-shadow: 0 5px 12px rgba(15, 23, 42, .07);
    }

    .market-chart-page .crypto-chart-surface {
        width: 100%;
        height: 238px;
        min-height: 238px;
        max-height: 238px;
        position: relative;
        overflow: hidden;
        border-radius: 13px;
    }

    .market-chart-page #cryptoChart svg,
    .market-chart-page #cryptoChart canvas,
    .market-chart-page #cryptoChart .apexcharts-canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        display: block;
    }

    .market-chart-page .chart-stats-row {
        height: 82px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 10px 12px;
        margin: 0 0 8px;
        border-radius: 16px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .chart-stat-col {
        min-width: 0;
        display: grid;
        gap: 8px;
        padding: 0 10px;
    }

    .market-chart-page .chart-stat-col:first-child {
        padding-left: 0;
    }

    .market-chart-page .chart-stat-col:last-child {
        padding-right: 0;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F6;
    }

    .market-chart-page .cs-label {
        margin: 0 0 3px;
        color: #8A94A6;
        font-size: 9px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        margin: 0;
        color: #06142E;
        font-size: 11px;
        line-height: 1.15;
        font-weight: 700;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        height: 62px;
        padding: 10px 14px;
        margin: 0 0 14px !important;
        border-radius: 16px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    }

    .market-chart-page .bs-header {
        margin-bottom: 9px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        color: #EF233C;
        font-size: 11px;
        line-height: 1;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 38px 1fr;
        align-items: center;
        gap: 8px;
    }

    .market-chart-page .bs-track {
        height: 8px;
        border-radius: 999px;
        background: #FFD3DA;
        overflow: hidden;
    }

    .market-chart-page .bs-track-fill {
        height: 100%;
        width: 56.71% !important;
        border-radius: 999px;
        background: #EF233C;
    }

    .market-chart-page .sell-fill {
        width: 43.29% !important;
        background: #F58B9A;
    }

    .market-chart-page .sentiment-ring {
        width: 34px;
        height: 34px;
        position: relative;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 56.71%, #FFD3DA 56.71% 100%);
    }

    .market-chart-page .sentiment-ring::after {
        content: "";
        position: absolute;
        inset: 9px;
        border-radius: 50%;
        background: #fff;
    }

    .bottom-nav.chart-nav {
        position: fixed;
        left: 20px;
        right: 20px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: 66px;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        transform: none;
        padding: 0;
        border: 0;
        border-radius: 16px;
        background: #fff;
        z-index: 500;
        box-shadow: 0 -8px 28px rgba(15, 23, 42, .12);
    }

    .bottom-nav.chart-nav .nav-item,
    .bottom-nav.chart-nav .deposit-btn-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-nav.chart-nav .nav-item {
        flex-direction: column;
        gap: 4px;
        color: #91A0B8;
        font-size: 10px;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .nav-item.active {
        color: #EF233C;
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 20px;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 10px;
        font-weight: 500;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 46px;
        height: 46px;
        margin: 0;
        top: auto;
        background: transparent;
        color: #6B7280;
        box-shadow: none;
        gap: 4px;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        width: 28px;
        height: 28px;
        color: #6B7280;
        font-size: 28px;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        color: #91A0B8;
        font-size: 10px;
        font-weight: 500;
    }
}

@media (max-width: 390px) {
    .app-wrapper:has(.market-chart-page) .page-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .market-chart-page .chart-coin-info {
        grid-template-columns: 54px 104px minmax(0, 1fr) 56px;
        column-gap: 8px;
    }

    .market-chart-page .chart-header-card {
        padding: 10px 12px;
    }

    .market-chart-page .chart-price {
        font-size: 22px;
    }

    .market-chart-page .chart-panel-card {
        height: 300px;
    }

    .market-chart-page .crypto-chart-surface {
        height: 228px;
        min-height: 228px;
        max-height: 228px;
    }

    .market-chart-page .chart-stat-col {
        padding-left: 8px;
        padding-right: 8px;
    }

    .market-chart-page .cs-label {
        font-size: 8.5px;
    }

    .market-chart-page .cs-value {
        font-size: 10.5px;
    }

    .bottom-nav.chart-nav {
        left: 16px;
        right: 16px;
    }
}

/* Market Chart mobile mockup */
@media (max-width: 991px) {
    html:has(.market-chart-page),
    body:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page),
    .app-wrapper:has(.market-chart-page) .main-content {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background: #fff;
    }

    body:has(.market-chart-page) * {
        box-sizing: border-box;
    }

    .app-wrapper:has(.market-chart-page) {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at 9% 19%, rgba(239, 35, 60, .14), transparent 22%),
            url("data:image/svg+xml,%3Csvg viewBox='0 0 220 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 130 42 112 70 126 105 82 132 96 165 38 192 52 220 15' fill='none' stroke='%23EF233C' stroke-width='2' opacity='.20'/%3E%3Cpath d='M28 150 62 136 90 148 122 108 150 120 182 76 214 92' fill='none' stroke='%23EF233C' stroke-width='1.5' opacity='.13'/%3E%3C/svg%3E") right 86px / 165px 135px no-repeat,
            radial-gradient(circle at 14% 18%, rgba(239, 35, 60, .045) 0 1px, transparent 1.2px) 0 0 / 8px 8px,
            #fff;
    }

    .app-wrapper:has(.market-chart-page)::before {
        display: none;
    }

    .app-wrapper:has(.market-chart-page) .top-bar {
        height: 46px;
        margin: 22px 0 18px;
        padding: 0;
        background: transparent;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-icon-sm {
        width: 24px;
        height: 24px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .brand-name {
        font-size: 24px;
        letter-spacing: -.8px;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .welcome {
        font-size: 9px;
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .user-info .username {
        font-size: 11px;
        line-height: 1.05;
    }

    .app-wrapper:has(.market-chart-page) .top-bar .avatar-btn {
        width: 42px;
        height: 42px;
    }

    .market-chart-page {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        color: #06142E;
    }

    .market-chart-page .page-header {
        padding: 10px 0 16px;
        text-align: center;
        justify-content: center;
    }

    .market-chart-page .page-header .ph-title {
        font-size: 25px;
        line-height: 1.15;
        font-weight: 700;
        letter-spacing: -.45px;
    }

    .market-chart-page .page-header .ph-subtitle {
        font-size: 13px;
        margin-top: 6px;
        color: #8A94A6;
    }

    .market-chart-page .chart-header-card,
    .market-chart-page .chart-panel-card,
    .market-chart-page .chart-stats-row,
    .market-chart-page .buy-sell-bar {
        border: none;
        border-radius: 18px;
        background: #fff;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, .05),
            0 2px 8px rgba(0, 0, 0, .03);
    }

    .market-chart-page .chart-header-card {
        height: 76px;
        padding: 10px 14px;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
    }

    .market-chart-page .chart-coin-info {
        width: 100%;
        display: grid;
        grid-template-columns: 58px 118px minmax(0, 1fr) 62px;
        align-items: center;
        column-gap: 10px;
        min-width: 0;
    }

    .market-chart-page .chart-coin-icon {
        width: 52px !important;
        height: 52px !important;
        flex: 0 0 52px;
        font-size: 26px !important;
    }

    .market-chart-page .chart-header-card .form-select {
        width: 108px !important;
        height: 32px;
        min-height: 32px;
        padding: 0 22px 0 12px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    .market-chart-page .chart-header-card span {
        display: block;
        margin-top: 5px;
        font-size: 10px !important;
        line-height: 1;
    }

    .market-chart-page .chart-price {
        font-size: 24px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: -.5px;
        white-space: nowrap;
    }

    .market-chart-page .chart-approx {
        font-size: 11px;
        margin-top: 4px;
    }

    .market-chart-page .chart-change {
        font-size: 12px;
        line-height: 1.15;
        font-weight: 700;
        color: #EF233C !important;
    }

    .market-chart-page .chart-change + div {
        font-size: 9px !important;
        line-height: 1.1;
        margin-top: 5px;
    }

    .market-chart-page .chart-panel-card {
        height: 310px;
        padding: 14px;
        margin-bottom: 10px !important;
        overflow: hidden;
    }

    .market-chart-page .chart-panel-card .card-body {
        height: 100%;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .market-chart-page .chart-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 38px;
        margin: 0 0 8px;
        flex: 0 0 38px;
    }

    .market-chart-page .timerange-tabs {
        flex: 1;
        height: 36px;
        padding: 3px;
        border-radius: 11px;
        background: #F6F7FA;
    }

    .market-chart-page .tr-tab {
        font-size: 12px;
        border-radius: 9px;
        color: #5C667A;
    }

    .market-chart-page .tr-tab.active {
        color: #EF233C;
        background: #FFE3E8;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btns {
        gap: 8px;
    }

    .market-chart-page .chart-type-btn {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        border: 1px solid #EEF1F6;
        box-shadow: none;
    }

    .market-chart-page .chart-type-btn.active {
        border-color: #EF233C;
        color: #EF233C;
        box-shadow: none;
    }

    .market-chart-page .crypto-chart-surface {
        height: 236px;
        min-height: 236px;
        max-height: 236px;
        flex: 0 0 236px;
        border-radius: 14px;
        overflow: hidden;
    }

    .market-chart-page #cryptoChart {
        border-radius: 14px;
    }

    .market-chart-page .chart-stats-row {
        height: 82px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        padding: 10px 12px;
        margin: 0 0 8px;
        overflow: hidden;
    }

    .market-chart-page .chart-stat-col {
        display: grid;
        gap: 0;
        align-content: start;
        padding: 0 10px;
        min-width: 0;
    }

    .market-chart-page .chart-stat-col + .chart-stat-col {
        border-left: 1px solid #EEF1F5;
    }

    .market-chart-page .cs-label {
        font-size: 9px;
        line-height: 1.1;
        color: #8A94A6;
        margin: 0;
        white-space: nowrap;
    }

    .market-chart-page .cs-value {
        margin: 3px 0 8px;
        font-size: 11px;
        line-height: 1.15;
        font-weight: 700;
        color: #06142E;
        white-space: nowrap;
    }

    .market-chart-page .buy-sell-bar {
        height: 62px;
        padding: 10px 14px;
        margin-bottom: 14px !important;
    }

    .market-chart-page .bs-header {
        margin-bottom: 9px;
    }

    .market-chart-page .buy-label,
    .market-chart-page .sell-label {
        color: #EF233C;
        font-size: 11px;
        font-weight: 500;
    }

    .market-chart-page .bs-track-wrap {
        display: grid;
        grid-template-columns: 1fr 38px 1fr;
        align-items: center;
        gap: 8px;
    }

    .market-chart-page .bs-track {
        height: 8px;
        border-radius: 99px;
        background: rgba(239, 35, 60, .18);
    }

    .market-chart-page .bs-track-fill {
        background: #EF233C;
        border-radius: 99px;
    }

    .market-chart-page .sell-track {
        background: rgba(239, 35, 60, .22);
    }

    .market-chart-page .sell-fill {
        background: #F58B9A;
    }

    .market-chart-page .sentiment-ring {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: conic-gradient(#EF233C 0 57%, #E5E7EB 57% 100%);
        position: relative;
    }

    .market-chart-page .sentiment-ring::after {
        content: "";
        position: absolute;
        inset: 9px;
        border-radius: 50%;
        background: #fff;
    }

    .bottom-nav.chart-nav {
        left: max(20px, calc((100vw - 430px) / 2 + 20px));
        right: max(20px, calc((100vw - 430px) / 2 + 20px));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: 66px;
        border-radius: 16px;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }

    .bottom-nav.chart-nav .nav-item i {
        font-size: 20px;
    }

    .bottom-nav.chart-nav .nav-item span {
        font-size: 10px;
    }

    .bottom-nav.chart-nav .deposit-fab {
        width: 44px;
        height: 44px;
        margin-top: 0;
        top: auto;
        background: transparent;
        color: #6B7280;
        box-shadow: none;
        gap: 1px;
    }

    .bottom-nav.chart-nav .deposit-fab i {
        font-size: 26px;
        color: #6B7280;
    }

    .bottom-nav.chart-nav .deposit-fab span {
        color: #6B7280;
        font-size: 9px;
        font-weight: 500;
    }
}
