.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
    gap: 1rem;
}

.dashboard-main,
.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-summary-panel {
    padding: 1.1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.wallet-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.wallet-balance-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.wallet-label-row{display:flex;align-items:center;gap:.55rem}.wallet-label-row .wallet-balance-toggle{width:30px;height:30px}.wallet-currency-select{width:auto;min-width:78px;margin:0;padding:.3rem 1.6rem .3rem .45rem;border:0;background-color:transparent;color:#e5f4ff;font-size:1rem;font-weight:800;box-shadow:none}.wallet-currency-select:focus{outline:1px solid rgba(77,225,189,.6)}.wallet-currency-select option{color:#111827;background:#fff}

.wallet-balance-row h2 {
    margin: 0;
    color: #111827;
    font-size: 2.5rem;
    line-height: 3rem;
    font-weight: 850;
}

.wallet-balance-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 1rem;
    transition: background 0.18s ease, color 0.18s ease;
}

.wallet-balance-toggle:hover,
.wallet-balance-toggle:focus {
    background: #f1f5f9;
    color: #0f766e;
    outline: 0;
}

.trend-positive {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #0f8b6d;
    font-weight: 800;
}

.account-status-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 150px;
    color: #64748b;
    font-weight: 800;
}

.wallet-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 1rem 0;
}

.wallet-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 1rem;
    border-right: 1px solid #e5e7eb;
}

.wallet-stat:first-child {
    padding-left: 0;
}

.wallet-stat:last-child {
    border-right: 0;
}

.wallet-stat span:not(.wallet-stat-icon) {
    display: block;
    color: #64748b;
    font-weight: 700;
}

.wallet-stat strong {
    display: block;
    color: #111827;
    font-size: 1.25rem;
    line-height: 1.55rem;
    margin-top: 0.2rem;
}

.wallet-stat-icon,
.timeline-dot {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.green-soft {
    background: #dff7ec;
    color: #0f8b6d;
}

.amber-soft {
    background: #fff3d5;
    color: #d97706;
}

.teal-soft {
    background: #dff8f6;
    color: #0f766e;
}

.customer-action-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.customer-action-strip .button {
    width: 100%;
}

.customer-list,
.timeline-list {
    display: flex;
    flex-direction: column;
}

.dashboard-position-list {
    display: flex;
    flex-direction: column;
}

.dashboard-position-row {
    display: grid;
    grid-template-columns: 40px minmax(120px, 1fr) repeat(4, minmax(92px, .72fr)) 20px;
    align-items: center;
    gap: 1rem;
    min-height: 72px;
    padding: .8rem 0;
    border-bottom: 1px solid #eef2f7;
    color: inherit;
    text-decoration: none;
}

.dashboard-position-row:last-child { border-bottom: 0; }
.dashboard-position-row:hover,
.dashboard-position-row:focus-visible,
.dashboard-position-row:active {
    background: linear-gradient(90deg, rgba(24, 199, 164, .14), rgba(24, 199, 164, .04));
    box-shadow: inset 3px 0 #2dd4bf;
    border-radius: 10px;
    outline: none;
}
.dashboard-position-name strong,
.dashboard-position-name small { display: block; }
.dashboard-position-name small { margin-top: .2rem; font-weight: 700; }
.position-long { color: #0f9f84; }
.position-short { color: #e14f65; }
.dashboard-position-row strong.green-text { color: #20c997 !important; }
.dashboard-position-row strong.red-text { color: #ff6078 !important; }
.wallet-summary-panel .trend-negative,
.wallet-summary-panel strong.red-text { color: #ff7b8f !important; }
.wallet-summary-panel .trend-positive,
.wallet-summary-panel strong.green-text { color: #4de1bd !important; }

@media (max-width: 720px) {
    .dashboard-position-row {
        grid-template-columns: 38px minmax(0, .9fr) minmax(0, 1.1fr);
        grid-template-rows: auto auto;
        column-gap: .7rem;
        row-gap: .75rem;
        min-width: 0;
        min-height: 104px;
        padding: 1rem 0;
    }
    .dashboard-position-row .asset-dot { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
    .dashboard-position-name { grid-column: 2; grid-row: 1; min-width: 0; }
    .dashboard-position-row .position-margin { display: none; }
    .dashboard-position-row .position-entry { grid-column: 2; grid-row: 2; }
    .dashboard-position-row .position-current { grid-column: 3; grid-row: 1; }
    .dashboard-position-row .position-pnl { grid-column: 3; grid-row: 2; }
    .dashboard-position-row .row-metric { min-width: 0; padding-left: 0; align-items: flex-start; }
    .dashboard-position-row .position-current,
    .dashboard-position-row .position-pnl { align-items: flex-end; text-align: right; }
    .dashboard-position-row .row-metric span { margin-bottom: .18rem; font-size: .72rem; line-height: 1.1; }
    .dashboard-position-row .row-metric strong { max-width: 100%; font-size: .82rem; line-height: 1.25; white-space: nowrap; }
    .dashboard-position-row .position-pnl strong { font-size: .9rem; font-weight: 800; }
    .dashboard-position-row .row-chevron { display: none; }
}

.customer-list-row,
.timeline-row,
.market-row {
    display: grid;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f7;
}

.customer-list-row {
    width: 100%;
    grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) 24px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.customer-list-row:last-child,
.timeline-row:last-child,
.market-row:last-child {
    border-bottom: 0;
}

.customer-list-row:hover {
    background: #f8fafc;
}

.row-main,
.timeline-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.row-main strong,
.timeline-row strong,
.market-row strong {
    display: block;
    color: #111827;
}

.row-main small,
.timeline-row small,
.market-row small {
    display: block;
    color: #64748b;
    font-weight: 600;
}

.asset-dot {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff3d5;
    color: #d97706;
}

.row-metric {
    display: flex;
    flex-direction: column;
    color: #64748b;
    font-weight: 700;
}

.row-metric strong {
    color: #111827;
}

.row-chevron {
    color: #94a3b8;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 96px;
    color: #64748b;
    font-weight: 800;
    background: #f8fafc;
    border-radius: 8px;
}

.timeline-row {
    justify-content: space-between;
}

.timeline-row>div {
    flex: 1;
}

.timeline-row a {
    color: #0f8b6d;
    font-weight: 800;
}

.featured-investment-panel,
.market-terminal-panel {
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.2), transparent 34%),
        linear-gradient(145deg, #071522, #0c1b2d 58%, #08111d) !important;
    border: 1px solid rgba(94, 234, 212, 0.18) !important;
    color: #eef6ff !important;
    box-shadow: 0 18px 45px rgba(8, 21, 34, 0.18);
}

.featured-investment-header,
.market-terminal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.featured-investment-header h2,
.market-terminal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.4rem;
    font-weight: 850;
}

.featured-investment-header .section-kicker,
.market-terminal-header span,
.featured-metric-card span,
.featured-metric-card small {
    color: #8fb0c8;
}

.market-terminal-header a {
    color: #45e0bf;
    font-weight: 850;
}

.featured-investment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(210px, 0.65fr);
    gap: 1rem;
}

.featured-chart-frame {
    min-height: 320px;
    padding: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    background: rgba(7, 21, 34, 0.78);
}

#dashboard-live-chart {
    width: 100%;
    height: 320px;
}

.featured-metric-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.featured-metric-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.featured-metric-card strong {
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1.8rem;
}

.market-terminal-panel {
    padding: 1rem;
}

.market-live-strip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(45, 212, 191, 0.18);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.1);
    color: #b6c7d8;
    font-size: 0.78rem;
    font-weight: 800;
}

.market-live-strip strong {
    color: #45e0bf;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2dd4bf;
    box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.13);
}

.market-quote-list {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    max-height: 790px;
    overflow-y: auto;
    padding-right: 0.1rem;
    scrollbar-color: rgba(94, 234, 212, 0.55) rgba(15, 23, 42, 0.55);
    scrollbar-width: thin;
}

.market-quote-list::-webkit-scrollbar {
    width: 6px;
}

.market-quote-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 999px;
}

.market-quote-list::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 212, 0.5);
    border-radius: 999px;
}

.market-quote-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) minmax(88px, auto);
    align-items: center;
    gap: 0.68rem;
    min-height: 62px;
    padding: 0.58rem 0.62rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.market-quote-row:hover {
    border-color: rgba(45, 212, 191, 0.35);
    background: rgba(45, 212, 191, 0.08);
    color: #ffffff;
}

.market-row-flash {
    border-color: rgba(94, 234, 212, 0.42);
    background: rgba(94, 234, 212, 0.09);
    box-shadow: 0 0 22px rgba(45, 212, 191, 0.14);
}

.market-symbol-pill {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(14, 165, 233, 0.15));
    color: #5eead4;
    font-size: 0.78rem;
    font-weight: 900;
}

.market-symbol-pill.has-logo {
    background: rgba(255, 255, 255, 0.94);
}

.market-symbol-pill img {
    display: block;
    max-width: 27px;
    max-height: 27px;
    object-fit: contain;
}

.market-quote-name strong {
    display: block;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.1rem;
}

.market-quote-name small {
    display: block;
    color: #8fb0c8;
    font-size: 0.69rem;
    margin-top: 0.14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-quote-price {
    text-align: right;
}

.market-quote-price strong {
    display: block;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.2rem;
    transition: color 0.18s ease, text-shadow 0.18s ease;
}

.market-quote-price span {
    display: inline-flex;
    justify-content: flex-end;
    margin-top: 0.16rem;
    font-size: 0.74rem;
    font-weight: 900;
}

.market-quote-price strong.tick-up {
    color: #45e0bf;
}

.market-quote-price strong.tick-down {
    color: #fb7185;
}

.market-quote-price strong.tick-flash.tick-up {
    text-shadow: 0 0 18px rgba(69, 224, 191, 0.65);
}

.market-quote-price strong.tick-flash.tick-down {
    text-shadow: 0 0 18px rgba(251, 113, 133, 0.65);
}

.market-quote-price .positive,
.featured-metric-card .green-text {
    color: #45e0bf !important;
}

.market-quote-price .negative,
.featured-metric-card .red-text {
    color: #fb7185 !important;
}

.market-empty-state {
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8fb0c8;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 800;
}

.market-tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.market-tabs button {
    padding: 0 0 0.7rem;
    border: 0;
    background: transparent;
    color: #64748b;
    font-weight: 800;
}

.market-tabs button.active {
    color: #0f8b6d;
    border-bottom: 2px solid #0f8b6d;
}

.market-row {
    grid-template-columns: minmax(0, 1.1fr) auto auto;
}

.market-row span {
    color: #111827;
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .wallet-summary-top,
    .wallet-stat-grid,
    .customer-action-strip,
    .dashboard-side {
        grid-template-columns: 1fr;
    }

    .wallet-summary-top {
        flex-direction: column;
    }

    .wallet-balance-row h2 {
        font-size: 2rem;
        line-height: 2.4rem;
    }

    .wallet-stat {
        padding: 0.85rem 0;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .wallet-stat:last-child {
        border-bottom: 0;
    }

    .customer-list-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .row-metric {
        align-items: flex-start;
        padding-left: 48px;
    }

    .row-chevron {
        display: none;
    }

    .featured-investment-layout {
        grid-template-columns: 1fr;
    }

    .featured-chart-frame,
    #dashboard-live-chart {
        min-height: 260px;
        height: 260px;
    }

    .featured-metric-stack {
        display: grid;
        grid-template-columns: 1fr;
    }

    .market-quote-row {
        grid-template-columns: 38px minmax(0, 1fr) minmax(84px, auto);
        min-height: 58px;
    }

    .market-quote-price {
        grid-column: auto;
        text-align: right;
    }
}

/* Direction 1 customer dashboard */
.dashboard-shell {
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.95fr);
    gap: 1.1rem;
}

.dashboard-main,
.dashboard-side {
    gap: 1.1rem;
}

.wallet-summary-panel {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border: 1px solid rgba(94, 234, 212, 0.16);
    border-radius: 8px;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.2), transparent 30rem),
        linear-gradient(145deg, rgba(10, 28, 47, 0.96), rgba(7, 19, 33, 0.94));
    color: #e5f4ff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.wallet-summary-panel::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 1.2rem;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    border: 26px solid rgba(94, 234, 212, 0.055);
}

.wallet-summary-top {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.wallet-balance-row h2 {
    color: #ffffff;
    font-size: clamp(2.6rem, 4.6vw, 5rem);
    line-height: 0.98;
    font-weight: 950;
}

.wallet-balance-toggle {
    color: #9fbed4;
}

.wallet-balance-toggle:hover,
.wallet-balance-toggle:focus {
    background: rgba(94, 234, 212, 0.12);
    color: #5eead4;
}

.trend-positive {
    color: #45e0bf;
    font-size: 1.04rem;
    font-weight: 950;
}

.account-status-block {
    color: #8faac0;
}

.wallet-stat-grid {
    position: relative;
    z-index: 1;
    gap: 0.8rem;
    padding: 1.15rem 0;
}

.wallet-stat {
    padding: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.052);
}

.wallet-stat:first-child {
    padding-left: 0.9rem;
}

.wallet-stat:last-child {
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.wallet-stat span:not(.wallet-stat-icon),
.row-metric,
.featured-metric-card span,
.featured-metric-card small {
    color: #8faac0;
}

.wallet-stat strong,
.row-metric strong,
.row-main strong,
.timeline-row strong {
    color: #ffffff;
}

.wallet-stat-icon,
.timeline-dot,
.asset-dot {
    border-radius: 8px;
}

.green-soft,
.teal-soft {
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
}

.amber-soft {
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

.customer-action-strip {
    position: relative;
    z-index: 1;
}

.customer-action-strip .button,
.primary-button,
.outline-button,
.ghost-button {
    min-height: 52px;
    border-radius: 8px;
    font-weight: 950;
}

.primary-button {
    border: 1px solid rgba(94, 234, 212, 0.28) !important;
    background: linear-gradient(135deg, #12b981, #0f766e) !important;
    color: #ffffff !important;
}

.outline-button {
    border: 1px solid rgba(251, 191, 36, 0.42) !important;
    background: rgba(251, 191, 36, 0.08) !important;
    color: #fbbf24 !important;
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #e5f4ff !important;
}

.featured-investment-panel,
.market-terminal-panel {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(9, 23, 38, 0.95), rgba(6, 16, 29, 0.96)) !important;
    border-color: rgba(94, 234, 212, 0.16) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.featured-investment-header h2,
.market-terminal-header h2,
.panel-header h2 {
    color: #ffffff;
    font-weight: 950;
}

.featured-chart-frame {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(3, 12, 22, 0.72);
}

.featured-metric-card,
.market-quote-row,
.customer-list-row,
.timeline-row {
    border-color: rgba(148, 163, 184, 0.14);
}

.featured-metric-card {
    background: rgba(255, 255, 255, 0.055);
}

.featured-metric-card strong {
    color: #ffffff;
    font-weight: 950;
}

.customer-list-row,
.timeline-row {
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.customer-list-row:hover {
    background: rgba(20, 184, 166, 0.08);
}

.row-main small,
.timeline-row small {
    color: #8faac0;
}

.empty-state {
    background: rgba(255, 255, 255, 0.045);
    color: #8faac0;
}

.market-live-strip {
    border-color: rgba(45, 212, 191, 0.22);
    background: rgba(20, 184, 166, 0.11);
    color: #d7ecfb;
}

.market-live-strip strong,
.market-terminal-header a {
    color: #5eead4;
}

.market-symbol-pill.has-logo {
    background: rgba(255, 255, 255, 0.94);
}

.market-row-flash {
    border-color: rgba(94, 234, 212, 0.42);
    background: rgba(94, 234, 212, 0.09);
}

@media (max-width: 1199.98px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .wallet-summary-panel {
        padding: 1rem;
    }

    .wallet-stat-grid {
        gap: 0.65rem;
    }

    .wallet-stat {
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    .dashboard-side {
        display: grid;
        grid-template-columns: 1fr;
    }

    .market-quote-list {
        max-height: 520px;
    }
}
