.equity-section {
    overflow: hidden;
}

.profile-equity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.profile-equity-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-equity-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.profile-equity-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-equity-nav-btn:hover:not(:disabled) {
    color: var(--accent-gold);
    border-color: rgba(212, 160, 23, 0.4);
    background: rgba(212, 160, 23, 0.08);
}

.profile-equity-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.profile-equity-range {
    min-width: 180px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.profile-equity-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-equity-nav-btn,
.profile-equity-timeframe-btn {
    position: relative;
    z-index: 3;
}

.profile-equity-timeframe-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-equity-timeframe-btn:hover,
.profile-equity-timeframe-btn.active {
    color: var(--accent-gold);
    border-color: rgba(212, 160, 23, 0.4);
    background: rgba(212, 160, 23, 0.08);
}

.profile-equity-timeframe-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.profile-equity-meta {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    position: relative;
    z-index: 2;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.profile-equity-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.92rem;
}

.equity-chart {
    position: relative;
    display: block;
    min-height: 300px;
    height: auto;
    padding: 18px 0 0;
    overflow: hidden;
    isolation: isolate;
}

.profile-equity-canvas {
    position: relative;
    min-height: 280px;
}

.profile-equity-svg {
    width: 100%;
    height: 280px;
    display: block;
    position: relative;
    z-index: 1;
}

.profile-equity-grid-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.profile-equity-area {
    fill: rgba(212, 160, 23, 0.12);
    pointer-events: none;
}

.profile-equity-line {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.profile-equity-line.negative {
    stroke: #ff5f57;
}

.profile-equity-point {
    fill: var(--accent-gold);
    stroke: #09111f;
    stroke-width: 2;
    pointer-events: none;
}

.profile-equity-point.negative {
    fill: #ff5f57;
}

.profile-equity-point-hit {
    fill: transparent;
    cursor: pointer;
}

.profile-equity-axis-label {
    fill: rgba(214, 223, 240, 0.72);
    font-size: 12px;
    font-family: var(--font-family);
}

.profile-equity-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 12px));
    min-width: 180px;
    max-width: 240px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(212, 160, 23, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(7, 11, 20, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
    pointer-events: none;
    z-index: 4;
}

.profile-equity-tooltip[hidden] {
    display: none;
}

.profile-equity-tooltip-label {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-equity-tooltip-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-equity-tooltip-row + .profile-equity-tooltip-row {
    margin-top: 6px;
}

.profile-equity-tooltip-value {
    color: var(--text-secondary);
    font-weight: 700;
    text-align: right;
}

@media (max-width: 720px) {
    .profile-equity-header {
        align-items: flex-start;
    }

    .profile-equity-toolbar {
        width: 100%;
        justify-content: space-between;
    }

    .profile-equity-range {
        min-width: 0;
    }

    .profile-equity-svg {
        height: 240px;
    }

    .equity-chart,
    .profile-equity-canvas {
        min-height: 240px;
    }

    .profile-equity-tooltip {
        min-width: 160px;
        max-width: 200px;
    }
}
